Commit b1a14f5f authored by Mike Greiling's avatar Mike Greiling

add notes to the disabled visibility setting string helper to ensure changes...

add notes to the disabled visibility setting string helper to ensure changes are reflected in the model as well
parent 6cad21ef
...@@ -77,6 +77,8 @@ module VisibilityLevelHelper ...@@ -77,6 +77,8 @@ module VisibilityLevelHelper
end end
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) def disallowed_project_visibility_level_description(level, project)
level_name = Gitlab::VisibilityLevel.level_name(level).downcase level_name = Gitlab::VisibilityLevel.level_name(level).downcase
reasons = [] reasons = []
...@@ -93,6 +95,8 @@ module VisibilityLevelHelper ...@@ -93,6 +95,8 @@ module VisibilityLevelHelper
"This project cannot be #{level_name}#{reasons}." "This project cannot be #{level_name}#{reasons}."
end 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) def disallowed_group_visibility_level_description(level, group)
level_name = Gitlab::VisibilityLevel.level_name(level).downcase level_name = Gitlab::VisibilityLevel.level_name(level).downcase
reasons = [] reasons = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment