Class: Event::API::V2::Admin::BaseController
- Inherits:
-
Event::ApplicationController
- Object
- ActionController::Base
- Event::ApplicationController
- Event::API::V2::Admin::BaseController
- Includes:
- JWTPayload
- Defined in:
- app/controllers/event/api/v2/admin/base_controller.rb
Direct Known Subclasses
Constant Summary collapse
- ADMIN_ROLES =
%w[superadmin admin accountant compliance support technical].freeze
Instance Method Summary collapse
-
#authorize_admin! ⇒ Object
before_action :authorize_admin!.
Methods included from JWTPayload
#email, #jwt_payload, #role, #uid
Methods included from ExceptionHandlers
Methods included from Response
#controller_namespace, #error_response, #errors_response, #json_response, #not_found
Instance Method Details
#authorize_admin! ⇒ Object
before_action :authorize_admin!
15 16 17 |
# File 'app/controllers/event/api/v2/admin/base_controller.rb', line 15 def not_found unless role.to_s.in?(ADMIN_ROLES) end |