summaryrefslogtreecommitdiff
path: root/app/helpers/visibility_level_helper.rb
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-03-01 12:22:29 -0300
committerFelipe Artur <felipefac@gmail.com>2016-03-10 10:38:36 -0300
commitf2a9ee258e0ee3a6fe0cb614e4b73c56dcd7339d (patch)
tree84e668890ee51355f7ac9275012fbee3e295f5c4 /app/helpers/visibility_level_helper.rb
parent60ddd5ef34686e1ea9edc82a6915a9e4738bee50 (diff)
downloadgitlab-ce-f2a9ee258e0ee3a6fe0cb614e4b73c56dcd7339d.tar.gz
Add permission level to groups
Diffstat (limited to 'app/helpers/visibility_level_helper.rb')
-rw-r--r--app/helpers/visibility_level_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb
index 71d33b445c2..c47342534a8 100644
--- a/app/helpers/visibility_level_helper.rb
+++ b/app/helpers/visibility_level_helper.rb
@@ -19,6 +19,8 @@ module VisibilityLevelHelper
case form_model
when Project
project_visibility_level_description(level)
+ when Group
+ group_visibility_level_description(level)
when Snippet
snippet_visibility_level_description(level, form_model)
end
@@ -35,6 +37,17 @@ module VisibilityLevelHelper
end
end
+ def group_visibility_level_description(level)
+ case level
+ when Gitlab::VisibilityLevel::PRIVATE
+ "The group can be accessed only by members."
+ when Gitlab::VisibilityLevel::INTERNAL
+ "The group can be accessed by any logged user."
+ when Gitlab::VisibilityLevel::PUBLIC
+ "The group can be accessed without any authentication."
+ end
+ end
+
def snippet_visibility_level_description(level, snippet = nil)
case level
when Gitlab::VisibilityLevel::PRIVATE