You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally, I should not hard-code "Please upgrade your plan." message in the caller side, but in the policy side. So that caller can just put_flash the error message coming from the policy.
Describe the solution you'd like
Able to set some value from the policy, and that is returned to caller as some property of Ash.Error.Forbidden.Policy.
Describe alternatives you've considered
Validation.
Express the feature either with a change to resource syntax, or with a change to the resource interface
Additional context
The text was updated successfully, but these errors were encountered:
Not so much right now. Your best bet would be to define a calculation that determines if a user's plan is sufficient, and share that between the policy and the UI.
Is your feature request related to a problem? Please describe.
I have this code:
Ideally, I should not hard-code
"Please upgrade your plan."
message in the caller side, but in the policy side. So that caller can justput_flash
the error message coming from the policy.Describe the solution you'd like
Able to set some value from the policy, and that is returned to caller as some property of
Ash.Error.Forbidden.Policy
.Describe alternatives you've considered
Validation.
Express the feature either with a change to resource syntax, or with a change to the resource interface
Additional context
The text was updated successfully, but these errors were encountered: