diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-08-30 14:37:08 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-08-30 14:37:08 -0500 |
commit | 6cad21efbe25ffe1c0a3a153a25ed9601b50c427 (patch) | |
tree | 0d54fc770aa34378b84bdb4a95483788ba698525 /app/helpers/visibility_level_helper.rb | |
parent | b9b0b37b3695d5925c3ba6cd90cdefcc3c67ba6e (diff) | |
download | gitlab-ce-6cad21efbe25ffe1c0a3a153a25ed9601b50c427.tar.gz |
revert changes to visibility level helpers from 6f03ddc
Diffstat (limited to 'app/helpers/visibility_level_helper.rb')
-rw-r--r-- | app/helpers/visibility_level_helper.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb index caadc12019c..a13127a6365 100644 --- a/app/helpers/visibility_level_helper.rb +++ b/app/helpers/visibility_level_helper.rb @@ -82,11 +82,11 @@ module VisibilityLevelHelper reasons = [] unless project.visibility_level_allowed_as_fork?(level) - reasons << project.visibility_error_for(:fork, level: level_name) + reasons << "the fork source project has lower visibility" end unless project.visibility_level_allowed_by_group?(level) - reasons << project.visibility_error_for(:group, level: level_name, group_level: project.group.visibility) + reasons << "the visibility of #{project.group.name} is #{project.group.visibility}" end reasons = reasons.any? ? ' because ' + reasons.to_sentence : '' @@ -98,15 +98,15 @@ module VisibilityLevelHelper reasons = [] unless group.visibility_level_allowed_by_projects?(level) - reasons << group.visibility_error_for(:projects, level: level_name) + reasons << "it contains projects with higher visibility" end unless group.visibility_level_allowed_by_sub_groups?(level) - reasons << group.visibility_error_for(:sub_groups, level: level_name) + reasons << "it contains sub-groups with higher visibility" end unless group.visibility_level_allowed_by_parent?(level) - reasons << group.visibility_error_for(:parent, level: level_name, parent_level: group.parent.visibility) + reasons << "the visibility of its parent group is #{group.parent.visibility}" end reasons = reasons.any? ? ' because ' + reasons.to_sentence : '' |