Commit 88b21571 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'pedropombeiro/348323/add-group-policy' into 'master'

Add admin_group_runners rule to GroupPolicy

See merge request gitlab-org/gitlab!76682
parents d90198ee 21a192d3
......@@ -157,6 +157,7 @@ class GroupPolicy < Namespaces::GroupProjectNamespaceSharedPolicy
enable :destroy_package
enable :create_projects
enable :admin_pipeline
enable :admin_group_runners
enable :admin_build
enable :read_cluster
enable :add_cluster
......
......@@ -27,7 +27,7 @@
- elsif @group_runners.empty?
= _('This group does not have any group runners yet.')
- if can?(current_user, :admin_pipeline, @project.group)
- if can?(current_user, :admin_group_runners, @project.group)
- group_link = link_to _("group's CI/CD settings."), group_settings_ci_cd_path(@project.group)
= _('Group maintainers can register group runners in the %{link}').html_safe % { link: group_link }
- else
......
......@@ -378,6 +378,7 @@ module EE
prevent :admin_issue_board_list
prevent :admin_issue
prevent :admin_pipeline
prevent :admin_group_runners
prevent :add_cluster
prevent :create_cluster
prevent :update_cluster
......
......@@ -48,6 +48,7 @@ RSpec.shared_context 'GroupPolicy context' do
destroy_package
create_projects
read_cluster create_cluster update_cluster admin_cluster add_cluster
admin_group_runners
]
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment