Class: Projects::GroupLinks::CreateService
- Inherits:
-
BaseService
- Object
- BaseService
- Projects::GroupLinks::CreateService
- Includes:
- GroupLinkable
- Defined in:
- app/services/projects/group_links/create_service.rb
Instance Attribute Summary
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project, shared_with_group, user, params) ⇒ CreateService
constructor
A new instance of CreateService.
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
#initialize(project, shared_with_group, user, params) ⇒ CreateService
Returns a new instance of CreateService.
8 9 10 11 12 |
# File 'app/services/projects/group_links/create_service.rb', line 8 def initialize(project, shared_with_group, user, params) @shared_with_group = shared_with_group super(project, user, params) end |
Instance Method Details
#execute ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/services/projects/group_links/create_service.rb', line 14 def execute if adding_a_group_as_owner? && cannot_assign_owner_responsibilities_to_member_in_project? error('403 Forbidden', 403) else super end end |