diff options
Diffstat (limited to 'app/policies/base_policy.rb')
-rw-r--r-- | app/policies/base_policy.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/policies/base_policy.rb b/app/policies/base_policy.rb index 462afbaa475..53b0073eccc 100644 --- a/app/policies/base_policy.rb +++ b/app/policies/base_policy.rb @@ -57,11 +57,9 @@ class BasePolicy < DeclarativePolicy::Base with_options scope: :user, score: 0 condition(:can_create_group) { @user&.can_create_group } - # TODO: update to check application setting - # https://gitlab.com/gitlab-org/gitlab/-/issues/423302 desc 'User can create an organization' - with_options scope: :user, score: 0 - condition(:can_create_organization) { true } + with_options scope: :global, score: 0 + condition(:can_create_organization) { Gitlab::CurrentSettings.can_create_organization } desc "The application is restricted from public visibility" condition(:restricted_public_level, scope: :global) do |