Module: JsonapiActions::Authorization
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/jsonapi_actions/authorization.rb
Instance Method Summary collapse
- #authorize(record, query = nil) ⇒ Object
- #permitted_attributes ⇒ Object
- #policy(record) ⇒ Object
- #policy_scope(scope) ⇒ Object
Instance Method Details
#authorize(record, query = nil) ⇒ Object
18 19 20 |
# File 'lib/jsonapi_actions/authorization.rb', line 18 def (record, query = nil) # do nothing end |
#permitted_attributes ⇒ Object
14 15 16 |
# File 'lib/jsonapi_actions/authorization.rb', line 14 def permitted_attributes [] end |
#policy(record) ⇒ Object
10 11 12 |
# File 'lib/jsonapi_actions/authorization.rb', line 10 def policy(record) OpenStruct.new(permitted_attributes: permitted_attributes) end |
#policy_scope(scope) ⇒ Object
6 7 8 |
# File 'lib/jsonapi_actions/authorization.rb', line 6 def policy_scope(scope) scope end |