Skip to content
Snippets Groups Projects

Add `admin_runners` custom role permission

Merged mo khan requested to merge mokhax/442851/admin_runners into master
All threads resolved!
Compare and Show latest version
18 files
+ 154
156
Compare changes
  • Side-by-side
  • Inline
Files
18
@@ -6,7 +6,7 @@ class CiCdController < Groups::ApplicationController
layout 'group_settings'
skip_cross_project_access_check :show
before_action :authorize_admin_group!, except: :show
before_action :authorize_admin_cicd_variables!, only: :show
before_action :authorize_admin_cicd_settings!, only: :show
before_action :authorize_update_max_artifacts_size!, only: [:update]
before_action :define_variables, only: [:show]
before_action :push_licensed_features, only: [:show]
@@ -47,6 +47,16 @@ def update_auto_devops
private
def authorize_admin_cicd_settings!
return if can_any?(current_user, [
:admin_cicd_variables,
:admin_group,
:admin_runner
], group)
access_denied!
end
def define_variables
define_ci_variables
end
Loading