diff options
author | Rémy Coutable <remy@rymai.me> | 2019-03-13 16:24:03 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-03-13 16:28:01 +0300 |
commit | 49ad9b7e1034715fe48892a343b9dab44c611b44 (patch) | |
tree | 3ac8aa1f594f23014870c94a07349644ee8f664e /app | |
parent | d40b9c494814aa7d846e713e51af178b8bc9c70b (diff) |
Merge branch 'modify_group_policy' into 'master'
Update group policy to reflect all the requirements
See merge request gitlab-org/gitlab-ce!25854
(cherry picked from commit d8bbd3e78e2fe21048bf4c3ad58fd815c8339200)
0a706446 Modify group policy
8a37dd7a Add changelog to reflect changes
71e522a5 Remove not relevant changes
9559470b Remove not relevant changes
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 |