add notes to the disabled visibility setting string helper to ensure changes are reflected in the model as well

This commit is contained in:
Mike Greiling 2017-08-30 14:40:09 -05:00
parent 6cad21efbe
commit b1a14f5fc9
1 changed files with 4 additions and 0 deletions

View File

@ -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 = []