Sha256: 7d2c8a33a10c12abeef4ad3a07e622ed3a898aaa5192512186d4b78034f9dbfe
Contents?: true
Size: 571 Bytes
Versions: 2
Compression:
Stored size: 571 Bytes
Contents
module Oauth2Provider class ApplicationController < ::ApplicationController (::ApplicationController._process_action_callbacks - ActionController::Base._process_action_callbacks).each{|callback|skip_before_filter callback.filter if callback.kind == :before} before_filter :_oauth_provider_authenticate include ControllerMixin layout 'oauth2_provider/application' def _oauth_provider_admin? unless current_user.admin? flash.alert = "Unauthorized access." redirect_to root_path return false end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
oauth2_provider_engine-0.0.2 | app/controllers/oauth2_provider/application_controller.rb |
oauth2_provider_engine-0.0.1 | app/controllers/oauth2_provider/application_controller.rb |