app/resources/maestrano/api/user_resource.rb in maestrano-connector-rails-2.3.2 vs app/resources/maestrano/api/user_resource.rb in maestrano-connector-rails-2.3.3
- old
+ new
@@ -13,9 +13,10 @@
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
end
end