debian-mirror-gitlab/app/services/groups/auto_devops_service.rb
2019-07-07 11:18:12 +05:30

17 lines
367 B
Ruby

# 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