summaryrefslogtreecommitdiff
path: root/app/helpers/visibility_level_helper.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-08-30 14:40:09 -0500
committerMike Greiling <mike@pixelcog.com>2017-08-30 14:40:09 -0500
commitb1a14f5fc94aa900e06aaddb3d13a5775ccffc54 (patch)
tree2c345ce09c0f0d7acb867dc85e8a4f71d8b277e3 /app/helpers/visibility_level_helper.rb
parent6cad21efbe25ffe1c0a3a153a25ed9601b50c427 (diff)
downloadgitlab-ce-b1a14f5fc94aa900e06aaddb3d13a5775ccffc54.tar.gz
add notes to the disabled visibility setting string helper to ensure changes are reflected in the model as well
Diffstat (limited to 'app/helpers/visibility_level_helper.rb')
-rw-r--r--app/helpers/visibility_level_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb
index a13127a6365..19550d37b2f 100644
--- a/app/helpers/visibility_level_helper.rb
+++ b/app/helpers/visibility_level_helper.rb
@@ -77,6 +77,8 @@ module VisibilityLevelHelper
end
end
+ # Note: these messages closely mirror the form validation strings found in the project
+ # model and any changes or additons to these may also need to be made there.
def disallowed_project_visibility_level_description(level, project)
level_name = Gitlab::VisibilityLevel.level_name(level).downcase
reasons = []
@@ -93,6 +95,8 @@ module VisibilityLevelHelper
"This project cannot be #{level_name}#{reasons}."
end
+ # Note: these messages closely mirror the form validation strings found in the group
+ # model and any changes or additons to these may also need to be made there.
def disallowed_group_visibility_level_description(level, group)
level_name = Gitlab::VisibilityLevel.level_name(level).downcase
reasons = []