From 6cad21efbe25ffe1c0a3a153a25ed9601b50c427 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 30 Aug 2017 14:37:08 -0500 Subject: revert changes to visibility level helpers from 6f03ddc --- app/helpers/visibility_level_helper.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/helpers/visibility_level_helper.rb') 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 : '' -- cgit v1.2.3