File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 11
11
12
12
if current_user
13
13
authenticate_application = DoorkeeperApplication . find_by! ( uid : client_id )
14
- allowed_application = current_user
15
- . user_allowed_applications . find_by ( enable : true , oauth_application_id : authenticate_application . id )
14
+ user_allowed = current_user . user_allowed_applications . exists? ( enable : true , oauth_application_id : authenticate_application . id )
16
15
17
- if allowed_application || authenticate_application . allow_login_by_default?
16
+ if user_allowed || authenticate_application . allow_login_by_default?
18
17
current_user
19
18
else
20
19
raise Doorkeeper ::Errors ::DoorkeeperError . new ( I18n . t ( 'ui.can_not_grant_applications' ) )
21
20
end
22
21
else
23
- warden . authenticate! ( : scope => :user )
22
+ warden . authenticate! ( scope : :user )
24
23
end
25
24
end
26
25
You can’t perform that action at this time.
0 commit comments