gitlab-org--gitlab-foss/app/controllers/oauth/authorizations_controller.rb

20 lines
542 B
Ruby
Raw Normal View History

2014-12-19 14:15:29 +00:00
class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
layout 'profile'
2014-12-19 14:15:29 +00:00
# Overriden from Doorkeeper::AuthorizationsController to
# include the call to session.delete
2014-12-19 14:15:29 +00:00
def new
if pre_auth.authorizable?
if skip_authorization? || matching_token?
auth = authorization.authorize
2016-02-19 13:22:06 +00:00
session.delete(:user_return_to)
2014-12-19 14:15:29 +00:00
redirect_to auth.redirect_uri
else
render "doorkeeper/authorizations/new"
end
else
render "doorkeeper/authorizations/error"
end
end
end