summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-18 19:11:25 +0100
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-19 21:24:05 +0100
commit1d7782281693a94b2d8efcdd9d05f81fefae75f9 (patch)
treec145ed956047668a69043ab1cc6946f307d1e996 /lib/api/helpers.rb
parent7342a4566cc2eef0e434f3aea0eac48674baaaf1 (diff)
downloadgitlab-ce-1d7782281693a94b2d8efcdd9d05f81fefae75f9.tar.gz
minor improvements and fixed specs
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index a72044e8058..4921ae99e78 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -118,9 +118,7 @@ module API
end
def authorize!(action, subject)
- unless abilities.allowed?(current_user, action, subject)
- forbidden!
- end
+ forbidden! unless abilities.allowed?(current_user, action, subject)
end
def authorize_push_project