summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorMałgorzata Ksionek <mksionek@gitlab.com>2019-03-13 13:24:03 +0000
committerRémy Coutable <remy@rymai.me>2019-03-13 13:24:03 +0000
commitad283fbb186fc3d8e72497e2d91a9625e3499cb8 (patch)
tree385614457e816862577e398ac00e442959a460cc /app/policies
parentf06a649ced952bcc439a5b3d36d96df178aabd66 (diff)
downloadgitlab-ce-ad283fbb186fc3d8e72497e2d91a9625e3499cb8.tar.gz
Update group policy to reflect all the requirements
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/group_policy.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb
index e74e5f008d7..db49d3bed9c 100644
--- a/app/policies/group_policy.rb
+++ b/app/policies/group_policy.rb
@@ -26,7 +26,7 @@ class GroupPolicy < BasePolicy
condition(:can_change_parent_share_with_group_lock) { can?(:change_share_with_group_lock, @subject.parent) }
condition(:has_projects) do
- GroupProjectsFinder.new(group: @subject, current_user: @user, options: { include_subgroups: true }).execute.any?
+ GroupProjectsFinder.new(group: @subject, current_user: @user, options: { include_subgroups: true, only_owned: true }).execute.any?
end
condition(:has_clusters, scope: :subject) { clusterable_has_clusters? }
@@ -55,6 +55,7 @@ class GroupPolicy < BasePolicy
rule { has_projects }.policy do
enable :read_list
enable :read_label
+ enable :read_group
end
rule { has_access }.enable :read_namespace