summaryrefslogtreecommitdiff
path: root/lib/gitlab/checks
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-05 18:59:46 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-06 10:56:21 +0100
commitf16377e7dc762462817dd0b34e36811c55988b10 (patch)
tree0c2848cee6743f0648e2c3d9361d201aca7fbf1a /lib/gitlab/checks
parent18506d4b8b8bc780b3b1e4c61339af38b5c49bb2 (diff)
downloadgitlab-ce-f16377e7dc762462817dd0b34e36811c55988b10.tar.gz
Protected Tags backend review changes
Added changelog
Diffstat (limited to 'lib/gitlab/checks')
-rw-r--r--lib/gitlab/checks/change_access.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/gitlab/checks/change_access.rb b/lib/gitlab/checks/change_access.rb
index 0d96c4d41d7..eb2f2e144fd 100644
--- a/lib/gitlab/checks/change_access.rb
+++ b/lib/gitlab/checks/change_access.rb
@@ -70,14 +70,8 @@ module Gitlab
def protected_tag_checks
return unless tag_protected?
-
- if update?
- return "Protected tags cannot be updated."
- end
-
- if deletion?
- return "Protected tags cannot be deleted."
- end
+ return "Protected tags cannot be updated." if update?
+ return "Protected tags cannot be deleted." if deletion?
unless user_access.can_create_tag?(@tag_name)
return "You are not allowed to create this tag as it is protected."