diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-02 00:06:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-02 00:06:09 +0300 |
commit | e0bd3a45d9dc6c74cac1a33ea8c03d6d8334249b (patch) | |
tree | df0bb30b7f0e06cfd59bda5bcadb21bf75ea70cc /app/policies | |
parent | ed3b1698883bd4ac2c4faf6c05c3a8155748bf91 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/group_policy.rb | 10 | ||||
-rw-r--r-- | app/policies/milestone_policy.rb | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index f56ac0a5279..951a104122d 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -44,25 +44,25 @@ class GroupPolicy < BasePolicy rule { public_group }.policy do enable :read_group - enable :read_list - enable :read_label end rule { logged_in_viewable }.enable :read_group rule { guest }.policy do enable :read_group - enable :read_list enable :upload_file - enable :read_label end rule { admin }.enable :read_group rule { has_projects }.policy do + enable :read_group + end + + rule { can?(:read_group) }.policy do + enable :read_milestone enable :read_list enable :read_label - enable :read_group end rule { has_access }.enable :read_namespace diff --git a/app/policies/milestone_policy.rb b/app/policies/milestone_policy.rb index ac4f5b08504..2d56eea6a78 100644 --- a/app/policies/milestone_policy.rb +++ b/app/policies/milestone_policy.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true class MilestonePolicy < BasePolicy - delegate { @subject.project } + delegate { @subject.parent } end |