7e9348f359
- Includes instance methods on Group model to detect when a group has AutoDevOps explicitly/implicitly enabled/disabled. - Includes migration to add a new column to namespaces table - Add UI necessary modifications - Add service and controller to update auto devops related instances - Updates project and groups auto devops badges Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52447
17 lines
367 B
Ruby
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
|