diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-13 18:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-13 18:08:09 +0300 |
commit | aadb3204eaf8b5912e262cd19fed34fc70789e95 (patch) | |
tree | ab19fa23b4e03cfd370b96627be10e0f2aefa648 /app/policies/group_policy.rb | |
parent | 67cddd762d819d320ea905ed068f816b354d14bc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies/group_policy.rb')
-rw-r--r-- | app/policies/group_policy.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index 9568998e27d..abb3616c58f 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -36,14 +36,7 @@ class GroupPolicy < Namespaces::GroupProjectNamespaceSharedPolicy condition(:request_access_enabled) { @subject.request_access_enabled } condition(:create_projects_disabled, scope: :subject) do - next true if @user.nil? - - visibility_evaluation_result = Gitlab::VisibilityLevelChecker - .new(user, Project.new(namespace_id: @subject.id)) - .level_restricted? - - @subject.project_creation_level == ::Gitlab::Access::NO_ONE_PROJECT_ACCESS || - visibility_evaluation_result.restricted? + @subject.project_creation_level == ::Gitlab::Access::NO_ONE_PROJECT_ACCESS end condition(:developer_maintainer_access, scope: :subject) do |