Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/global_policy.rb')
-rw-r--r--app/policies/global_policy.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb
index bf7bfe36254..7594360a91c 100644
--- a/app/policies/global_policy.rb
+++ b/app/policies/global_policy.rb
@@ -29,6 +29,7 @@ class GlobalPolicy < BasePolicy
prevent :receive_notifications
prevent :use_quick_actions
prevent :create_group
+ prevent :create_organization
prevent :execute_graphql_mutation
end
@@ -93,6 +94,10 @@ class GlobalPolicy < BasePolicy
enable :create_group
end
+ rule { can_create_organization }.policy do
+ enable :create_organization
+ end
+
rule { can?(:create_group) }.policy do
enable :create_group_with_default_branch_protection
end