Class: Metadatastore::API::V2::Admin::BaseController
- Inherits:
-
Metadatastore::ApplicationController
- Object
- ActionController::Base
- Metadatastore::ApplicationController
- Metadatastore::API::V2::Admin::BaseController
- Includes:
- JWTPayload
- Defined in:
- app/controllers/metadatastore/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
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
15 16 17 |
# File 'app/controllers/metadatastore/api/v2/admin/base_controller.rb', line 15 def not_found unless role.to_s.in?(ADMIN_ROLES) end |