Class: Maestrano::Api::UserResource
- Inherits:
-
BaseResource
- Object
- JSONAPI::Resource
- BaseResource
- Maestrano::Api::UserResource
- Defined in:
- app/resources/maestrano/api/user_resource.rb
Constant Summary
Constants inherited from BaseResource
BaseResource::API_SQL_OPERATOR_MAPPING
Instance Method Summary collapse
Methods inherited from BaseResource
all_filters, attribute_type, generate_composite_filters, tables_exists?
Instance Method Details
#save ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/resources/maestrano/api/user_resource.rb', line 14 def save @model.tenant = context[:client] super return unless org_uid == context.dig(:params, :org_uid) org = Maestrano::Connector::Rails::Organization.find_by(org_uid: org_uid) org.add_member(@model) unless !org || org.member?(@model) end |