diff options
author | Małgorzata Ksionek <mksionek@gitlab.com> | 2019-03-13 13:24:03 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-03-13 13:24:03 +0000 |
commit | ad283fbb186fc3d8e72497e2d91a9625e3499cb8 (patch) | |
tree | 385614457e816862577e398ac00e442959a460cc /app | |
parent | f06a649ced952bcc439a5b3d36d96df178aabd66 (diff) | |
download | gitlab-ce-ad283fbb186fc3d8e72497e2d91a9625e3499cb8.tar.gz |
Update group policy to reflect all the requirements
Diffstat (limited to 'app')
-rw-r--r-- | app/policies/group_policy.rb | 3 |
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 |