ash
ash copied to clipboard
Support bypass multi tenancy for aggregates and calculations
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
AI Policy
- [x] I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.
Is your feature request related to a problem? Please describe.
No Support for Revaluation or Bypassing Multi-Tenancy in Aggregates and Calculations
Sometimes we need to bypass multitenancy, even if we use Ash.load or add read_action :read_any and add a new tendency id to it, it dose not accept.
aggregates do
custom :media_count, :media, :integer do
public? true
implementation MishkaCms.Runtime.Aggregates.MediaCountAggregate
description "Returns total number of media files in this category using custom aggregate that bypasses multitenancy"
end
end
Describe the solution you'd like
If it accepts from parent
Ash.load!(category, [:media_count],
tenant: media_query_tenant,
authorize?: false
)
And something like multitenancy :bypass, fix the problem
Refs
- https://discord.com/channels/711271361523351632/1426476980274200577
Describe alternatives you've considered
No response
Additional context
No response
This would be a welcome change, PRs welcome!
@zachdaniel it should read multitenancy from its parent action? or it should have multitenancy bypass inside itself?
Well calculations can come from any action so they'd need to have their own config.