diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:07:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 18:07:39 +0300 |
commit | 862d225ca0d8eb452e56b8fe5a0109aac796e872 (patch) | |
tree | ebf0a5d43bd271fadd9004245fb7c7cf0543dcc1 /app/policies/project_snippet_policy.rb | |
parent | d10a462fedbd7794a83abdba9b4526600f71de5b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies/project_snippet_policy.rb')
-rw-r--r-- | app/policies/project_snippet_policy.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/project_snippet_policy.rb b/app/policies/project_snippet_policy.rb index 076492c6823..a9094fbd958 100644 --- a/app/policies/project_snippet_policy.rb +++ b/app/policies/project_snippet_policy.rb @@ -38,6 +38,10 @@ class ProjectSnippetPolicy < BasePolicy rule { public_snippet }.enable :read_project_snippet + rule { is_author & ~project.reporter & ~admin }.policy do + prevent :admin_project_snippet + end + rule { is_author | admin }.policy do enable :read_project_snippet enable :update_project_snippet |