Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
21a192d3
Commit
21a192d3
authored
Dec 15, 2021
by
Pedro Pombeiro
Committed by
Natalia Tepluhina
Dec 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add admin_group_runners rule to GroupPolicy
parent
783ce2d8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
1 deletion
+4
-1
app/policies/group_policy.rb
app/policies/group_policy.rb
+1
-0
app/views/projects/runners/_group_runners.html.haml
app/views/projects/runners/_group_runners.html.haml
+1
-1
ee/app/policies/ee/group_policy.rb
ee/app/policies/ee/group_policy.rb
+1
-0
spec/support/shared_contexts/policies/group_policy_shared_context.rb
...t/shared_contexts/policies/group_policy_shared_context.rb
+1
-0
No files found.
app/policies/group_policy.rb
View file @
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
...
...
app/views/projects/runners/_group_runners.html.haml
View file @
21a192d3
...
...
@@ -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
...
...
ee/app/policies/ee/group_policy.rb
View file @
21a192d3
...
...
@@ -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
...
...
spec/support/shared_contexts/policies/group_policy_shared_context.rb
View file @
21a192d3
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment