Sha256: af14368bc4774990034c1220519412be324f31a201e03880cf010cb65a64e701
Contents?: true
Size: 627 Bytes
Versions: 3
Compression:
Stored size: 627 Bytes
Contents
class Admin::ApplicationController < Spud::ApplicationController before_action :require_admin_user add_breadcrumb "Dashboard", :admin_root_path layout 'admin/detail' respond_to :html, :json private def require_admin_user if current_user.blank? flash[:notice] = "You must be logged in to access the requested page" redirect_to admin_login_path(:return_to => request.path) return false elsif !current_user.has_admin_rights? raise Spud::AccessDeniedError.new(:item => 'module', :template => '/layouts/admin/error_page') return false else return true end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tb_core-1.3.2 | app/controllers/admin/application_controller.rb |
tb_core-1.3.1 | app/controllers/admin/application_controller.rb |
tb_core-1.3.0 | app/controllers/admin/application_controller.rb |