summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-07-27 17:41:40 +0000
committerRobert Speicher <robert@gitlab.com>2017-07-27 17:41:40 +0000
commit86ae883b638d29953f26a87efc16ae613ff865e4 (patch)
tree6d216f1ec842e8cb72a9efac4ba576146aa176a5 /config
parent066f4d8b715aa6c58bffe39b7f9fb35e6e6ff8a9 (diff)
parentf837cd6611a39d3dd38655821f32feb2c2abba8d (diff)
downloadgitlab-ce-86ae883b638d29953f26a87efc16ae613ff865e4.tar.gz
Merge branch 'backport-ee-2456' into 'master'
Skip OAuth authorization for trusted applications See merge request !13061
Diffstat (limited to 'config')
-rw-r--r--config/initializers/doorkeeper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb
index 8e2e639fc41..40e635bf2cf 100644
--- a/config/initializers/doorkeeper.rb
+++ b/config/initializers/doorkeeper.rb
@@ -92,9 +92,9 @@ Doorkeeper.configure do
# Under some circumstances you might want to have applications auto-approved,
# so that the user skips the authorization step.
# For example if dealing with trusted a application.
- # skip_authorization do |resource_owner, client|
- # client.superapp? or resource_owner.admin?
- # end
+ skip_authorization do |resource_owner, client|
+ client.application.trusted?
+ end
# WWW-Authenticate Realm (default "Doorkeeper").
# realm "Doorkeeper"