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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-09 18:11:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-09 18:11:31 +0300
commit283318c20561cc040b62397060771efa74db0d90 (patch)
tree31b724e53806352b1bff5e1e460e6f4445c4e0a0 /app/models/group.rb
parent1f229cdc22b5b32989bcff2037d8925c75703671 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/group.rb')
-rw-r--r--app/models/group.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index 4bf91474405..55455d85531 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -176,6 +176,16 @@ class Group < Namespace
.where(project_authorizations: { user_id: user_ids })
end
+ scope :project_creation_allowed, -> do
+ permitted_levels = [
+ ::Gitlab::Access::DEVELOPER_MAINTAINER_PROJECT_ACCESS,
+ ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS,
+ nil
+ ]
+
+ where(project_creation_level: permitted_levels)
+ end
+
class << self
def sort_by_attribute(method)
if method == 'storage_size_desc'