Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain the difference in when and using in access policies #6116

Open
raddevon opened this issue Sep 20, 2023 · 0 comments
Open

Explain the difference in when and using in access policies #6116

raddevon opened this issue Sep 20, 2023 · 0 comments

Comments

@raddevon
Copy link
Contributor

Elvis:

There used to be a semantic difference, but it no longer exists. Right now the difference is mostly aesthetic: I'd use when to "gate" an access policy on some global condition (such as a logged-in user type), and using for an actual filtering expression,
e.g

when ((global user).group != "admin")
using (not .protected)

The access policy groups RFC would make when more useful since you wouldn't need to restate it for a group. Not sure if this will be implemented or not.

@raddevon raddevon self-assigned this Sep 20, 2023
@raddevon raddevon removed their assignment Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant