diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-03-20 21:03:53 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-03-20 21:04:07 +0100 |
commit | 8db1292139cfdac4c29c03b876b68b9e752cf75a (patch) | |
tree | 2fcf67ada482ecf4ac90f39c858334a62b709618 /app/services/base_service.rb | |
parent | 2eb19ea3ea36916bbea72a8ccab3e6d15f602ac9 (diff) | |
download | gitlab-ce-8db1292139cfdac4c29c03b876b68b9e752cf75a.tar.gz |
Tweaks, refactoring, and specs
Diffstat (limited to 'app/services/base_service.rb')
-rw-r--r-- | app/services/base_service.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/services/base_service.rb b/app/services/base_service.rb index 8563633816c..0d55ba5a981 100644 --- a/app/services/base_service.rb +++ b/app/services/base_service.rb @@ -43,12 +43,9 @@ class BaseService def deny_visibility_level(model, denied_visibility_level = nil) denied_visibility_level ||= model.visibility_level - level_name = Gitlab::VisibilityLevel.level_name(denied_visibility_level) + level_name = Gitlab::VisibilityLevel.level_name(denied_visibility_level).downcase - model.errors.add( - :visibility_level, - "#{level_name} visibility has been restricted by your GitLab administrator" - ) + model.errors.add(:visibility_level, "#{level_name} has been restricted by your GitLab administrator") end private |