Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-03-01 00:19:52 +0300
committerhttp://jneen.net/ <jneen@jneen.net>2017-03-09 22:49:52 +0300
commit0ea04cc5bfcc125875a6e0f46702389f0e2e19c0 (patch)
treed5cb804a8ce4c5a28bd9cc40724fc96457c29e7f /lib
parentd9cfed07cd1048328499ae06807368be29bdeb2c (diff)
use the policy stack to protect logins
Diffstat (limited to 'lib')
-rw-r--r--lib/api/helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index e5f5de2af57..bd22b82476b 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -97,7 +97,7 @@ module API
end
def authenticate!
- unauthorized! unless current_user
+ unauthorized! unless current_user && can?(current_user, :access_api)
end
def authenticate_non_get!