diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-18 19:11:25 +0100 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-19 21:24:05 +0100 |
commit | 1d7782281693a94b2d8efcdd9d05f81fefae75f9 (patch) | |
tree | c145ed956047668a69043ab1cc6946f307d1e996 /lib/api/helpers.rb | |
parent | 7342a4566cc2eef0e434f3aea0eac48674baaaf1 (diff) | |
download | gitlab-ce-1d7782281693a94b2d8efcdd9d05f81fefae75f9.tar.gz |
minor improvements and fixed specs
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 4 |
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 |