Replies: 1 comment 4 replies
-
My rule of thumb: if something makes you unhappy, there is likely a better way to do that 🙂 Dealing with l prefer the following approach: authorize the parent context access. In your case it could be either relying on a general rule, say, |
Beta Was this translation helpful? Give feedback.
-
Say my Users can either create a standalone Event or an Event that is a part of a Series, and the policy is slightly different for each case, namely, standalone Events can be created freely, but an Event in a Series can only be created by someone who can edit a series (has :update permission).
I imagine I can do something like this
But I'm not happy that the whole policy needs to be polluted with an optional context option. Do plain kwarg(s) work? (I'm not particularly worried about how they mess with controller helpers, prefer explicit calls)
Beta Was this translation helpful? Give feedback.
All reactions