summaryrefslogtreecommitdiff
path: root/app/policies/project_snippet_policy.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 07:53:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-10 07:53:40 +0000
commitcfc792b9ca064990e6540cb742e80529ea669a81 (patch)
tree147cd4256319990cebbc02fe8e4fbbbe06f5720a /app/policies/project_snippet_policy.rb
parent93c6764dacd4c605027ef1cd367d3aebe420b223 (diff)
downloadgitlab-ce-cfc792b9ca064990e6540cb742e80529ea669a81.tar.gz
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.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/policies/project_snippet_policy.rb b/app/policies/project_snippet_policy.rb
index d9d09eb04cd..076492c6823 100644
--- a/app/policies/project_snippet_policy.rb
+++ b/app/policies/project_snippet_policy.rb
@@ -45,6 +45,9 @@ class ProjectSnippetPolicy < BasePolicy
end
rule { ~can?(:read_project_snippet) }.prevent :create_note
+
+ # Aliasing the ability to ease GraphQL permissions check
+ rule { can?(:read_project_snippet) }.enable :read_snippet
end
ProjectSnippetPolicy.prepend_if_ee('EE::ProjectSnippetPolicy')