summaryrefslogtreecommitdiff
path: root/app/policies/global_policy.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-29 21:06:13 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-29 21:06:13 +0000
commit839c080dd0976f19c274eee1331c47985490cd41 (patch)
treeda3af62d5469f80c7555f9e8df11c18049e0334e /app/policies/global_policy.rb
parent8263f6ee3131cdea3c6041785c32771a6af0b24f (diff)
downloadgitlab-ce-839c080dd0976f19c274eee1331c47985490cd41.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies/global_policy.rb')
-rw-r--r--app/policies/global_policy.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb
index eca73f0a241..f212bb06bc9 100644
--- a/app/policies/global_policy.rb
+++ b/app/policies/global_policy.rb
@@ -75,12 +75,15 @@ class GlobalPolicy < BasePolicy
rule { ~anonymous }.policy do
enable :read_instance_metadata
+ enable :create_personal_snippet
end
rule { admin }.policy do
enable :read_custom_attribute
enable :update_custom_attribute
end
+
+ rule { external_user }.prevent :create_personal_snippet
end
GlobalPolicy.prepend_if_ee('EE::GlobalPolicy')