diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-08-30 22:37:08 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-08-30 22:37:08 +0300 |
commit | 6cad21efbe25ffe1c0a3a153a25ed9601b50c427 (patch) | |
tree | 0d54fc770aa34378b84bdb4a95483788ba698525 /app/models/group.rb | |
parent | b9b0b37b3695d5925c3ba6cd90cdefcc3c67ba6e (diff) |
revert changes to visibility level helpers from 6f03ddc
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 0e6d88f6a91..3778b832a47 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -297,18 +297,18 @@ class Group < Namespace def visibility_level_allowed_by_parent return if visibility_level_allowed_by_parent? - errors.add(:visibility_level, visibility_error_for(:parent, level: visibility, parent_level: parent.visibility)) + errors.add(:visibility_level, "#{visibility} is not allowed since the parent group has a #{parent.visibility} visibility.") end def visibility_level_allowed_by_projects return if visibility_level_allowed_by_projects? - errors.add(:visibility_level, visibility_error_for(:projects, level: visibility)) + errors.add(:visibility_level, "#{visibility} is not allowed since this group contains projects with higher visibility.") end def visibility_level_allowed_by_sub_groups return if visibility_level_allowed_by_sub_groups? - errors.add(:visibility_level, visibility_error_for(:sub_groups, level: visibility)) + errors.add(:visibility_level, "#{visibility} is not allowed since there are sub-groups with higher visibility.") end end |