diff options
Diffstat (limited to 'app/services/groups/auto_devops_service.rb')
-rw-r--r-- | app/services/groups/auto_devops_service.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/services/groups/auto_devops_service.rb b/app/services/groups/auto_devops_service.rb new file mode 100644 index 00000000000..1925e0cc0ea --- /dev/null +++ b/app/services/groups/auto_devops_service.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Groups + class AutoDevopsService < Groups::BaseService + def execute + raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_group, group) + + group.update(auto_devops_enabled: auto_devops_enabled) + end + + private + + def auto_devops_enabled + params[:auto_devops_enabled] + end + end +end |