diff options
Diffstat (limited to 'app/controllers/concerns/oauth_applications.rb')
-rw-r--r-- | app/controllers/concerns/oauth_applications.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/concerns/oauth_applications.rb b/app/controllers/concerns/oauth_applications.rb index d2c746db12d..794307ebb0c 100644 --- a/app/controllers/concerns/oauth_applications.rb +++ b/app/controllers/concerns/oauth_applications.rb @@ -3,6 +3,8 @@ module OauthApplications extend ActiveSupport::Concern + CREATED_SESSION_KEY = :oauth_applications_created + included do before_action :prepare_scopes, only: [:create, :update] end @@ -15,6 +17,14 @@ module OauthApplications end end + def set_created_session + session[CREATED_SESSION_KEY] = true + end + + def get_created_session + session.delete(CREATED_SESSION_KEY) || false + end + def load_scopes @scopes ||= Doorkeeper.configuration.scopes end |