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 'lib/gitlab/access.rb')
-rw-r--r--lib/gitlab/access.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/gitlab/access.rb b/lib/gitlab/access.rb
index ed5816482a9..6492ccc286a 100644
--- a/lib/gitlab/access.rb
+++ b/lib/gitlab/access.rb
@@ -103,10 +103,22 @@ module Gitlab
}
end
+ def project_creation_string_options
+ {
+ 'noone' => NO_ONE_PROJECT_ACCESS,
+ 'maintainer' => MAINTAINER_PROJECT_ACCESS,
+ 'developer' => DEVELOPER_MAINTAINER_PROJECT_ACCESS
+ }
+ end
+
def project_creation_values
project_creation_options.values
end
+ def project_creation_string_values
+ project_creation_string_options.keys
+ end
+
def project_creation_level_name(name)
project_creation_options.key(name)
end
@@ -117,6 +129,21 @@ module Gitlab
s_('SubgroupCreationlevel|Maintainers') => MAINTAINER_SUBGROUP_ACCESS
}
end
+
+ def subgroup_creation_string_options
+ {
+ 'owner' => OWNER_SUBGROUP_ACCESS,
+ 'maintainer' => MAINTAINER_SUBGROUP_ACCESS
+ }
+ end
+
+ def subgroup_creation_values
+ subgroup_creation_options.values
+ end
+
+ def subgroup_creation_string_values
+ subgroup_creation_string_options.keys
+ end
end
def human_access