[Feature Request] enable template strings/ string interpolation in policies
Is your feature request related to a problem? Please describe. It would be really neat if we could use string interpolation in policies as we have some kind of problem for restriction checks. For example:
@@allow('all',
auth().restrictions?[
scopes?[policy_name == "${currentModel()}:${currentOperation()}"
]]
)
Sure it would be possible to use something like startsWith and endsWith, but this is also not quite the same as we this can lead to different problems down the road.
Describe alternatives you've considered
An alternative for us right now is only refactoring the attributes so we don't have policy_name = "user:read" rather than resource = 'user', action = 'read'. But for this we have to do some kind of refactor and don't know if we would encounter this problem again in the future. Would just be nice to have the option to do it.