diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-07-12 10:47:36 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-07-13 14:18:05 +0530 |
commit | bb81f2afc1d82d6e88d7039025c8a8be0794aac6 (patch) | |
tree | e016e94d8e0d709ca4d614a0ecae81b4bfe48700 /lib | |
parent | ea9e8f4609f46f9c5713a8346f91dc19d310c2e1 (diff) | |
download | gitlab-ce-bb81f2afc1d82d6e88d7039025c8a8be0794aac6.tar.gz |
Implement last round of review comments from !4892.18193-developers-can-merge
1. Fix typos, minor styling errors.
2. Use single quotes rather than double quotes in `user_access_spec`.
3. Test formatting.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/checks/change_access.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/checks/change_access.rb b/lib/gitlab/checks/change_access.rb index cb8f4f2cbdd..5551fac4b8b 100644 --- a/lib/gitlab/checks/change_access.rb +++ b/lib/gitlab/checks/change_access.rb @@ -28,7 +28,7 @@ module Gitlab if forced_push? && user_access.cannot_do_action?(:force_push_code_to_protected_branches) return "You are not allowed to force push code to a protected branch on this project." elsif Gitlab::Git.blank_ref?(@newrev) && user_access.cannot_do_action?(:remove_protected_branches) - return "You are not allowed to deleted protected branches from this project." + return "You are not allowed to delete protected branches from this project." end if matching_merge_request? @@ -47,7 +47,9 @@ module Gitlab end def tag_checks - if (tag_ref = tag_name(@ref)) && protected_tag?(tag_ref) && user_access.cannot_do_action?(:admin_project) + tag_ref = tag_name(@ref) + + if tag_ref && protected_tag?(tag_ref) && user_access.cannot_do_action?(:admin_project) "You are not allowed to change existing tags on this project." end end |