Skip to content
Snippets Groups Projects

Add `admin_runners` custom role permission

Merged mo khan requested to merge mokhax/442851/admin_runners into master
Compare and Show latest version
11 files
+ 90
21
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -9,7 +9,7 @@ class CiCdController < Projects::ApplicationController
layout 'project_settings'
before_action :authorize_admin_pipeline!, except: :show
before_action :authorize_admin_cicd_variables!, only: :show
before_action :authorize_show_cicd_settings!, only: :show
before_action :check_builds_available!
before_action :define_variables
@@ -75,6 +75,15 @@ def runner_setup_scripts
private
def authorize_show_cicd_settings!
return if can_any?(current_user, [
:admin_cicd_variables,
:admin_runner
], project)
access_denied!
end
def highlight_badge(name, content, language = nil)
Gitlab::Highlight.highlight(name, content, language: language)
end
Loading