Which one do you prefer? 馃槑
allow with input.users as {"ted": "developer"}
or
allow with input.users.ted as "developer"
I think the latter, but with some reservations, like how an object of many keys likely shouldn't be replaced by as many with statements. Anyway, this would be a fun opt-in rule (hence in the custom category) for those who prefer a consistent style in their policy tests, where the rule could be configured for either preference, and have Regal enforce that. The rule would need a few configuration options to account for things like the size of the value and so on, and it would of course be very nice if there was an equivalent fix command / code action to automatically rewrite one form into the other!
Which one do you prefer? 馃槑
or
I think the latter, but with some reservations, like how an object of many keys likely shouldn't be replaced by as many
withstatements. Anyway, this would be a fun opt-in rule (hence in the custom category) for those who prefer a consistent style in their policy tests, where the rule could be configured for either preference, and have Regal enforce that. The rule would need a few configuration options to account for things like the size of the value and so on, and it would of course be very nice if there was an equivalentfixcommand / code action to automatically rewrite one form into the other!