diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-01 12:22:29 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-10 10:38:36 -0300 |
commit | f2a9ee258e0ee3a6fe0cb614e4b73c56dcd7339d (patch) | |
tree | 84e668890ee51355f7ac9275012fbee3e295f5c4 /app/helpers/visibility_level_helper.rb | |
parent | 60ddd5ef34686e1ea9edc82a6915a9e4738bee50 (diff) | |
download | gitlab-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.rb | 13 |
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 |