-
Couldn't load subscription status.
- Fork 99
fix(roles): update types #2691
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
base: master
Are you sure you want to change the base?
fix(roles): update types #2691
Conversation
7f6485f to
233d2df
Compare
|
Is anyone able to give this a review? |
f6e4368 to
67fdb54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
67fdb54 to
a12d0ad
Compare
|
Hey @leeroyrose — sorry for the delay, and thanks for opening this PR! I’ve flagged a few folks who might be impacted to take a look. In the meantime, I’d recommend introducing a new |
|
Thank you for your reply. Only code within the client could have used the export and judging by the builds and a quick search in the codebase, it's not being used anywhere. In the process of renaming the variable, I added it to the |
|
Hey, thank you for the approval. Before I merge, would it be possible to get some clarification on my question regarding the
|
a12d0ad to
699bc1f
Compare
Summary
Update role types to reflect documentation and better reflect return values from the api.
Description
Adds string to the ContentModel type so it can accept the value "all". When retrieving roles using the apis, the ContentModel is set to "all" but when creating them, you are forced to use an array - ["all"].
Adds an action type to allow better typing and support for the "access" action. Exports the type as it's quite useful. Renamed it to prevent clashes/make it clear what it's used for.
Also, there is some confusion about the
notoperator. In the documentation here, it says "You can specify nested constraints for and, or, not". When referencing the table of examples, it states that not can only accept one constraint as an argument. I have personally concluded thatnotcan be used as both a nested operator, used at the top level and as an operator that takes one constraint. Would it be possible to confirm this and possibly update the documentation?Motivation and Context
This change fixes a bug wth the ContentModel permission not accepting a string and adds access as an action type for writting environment based policies.
Checklist (check all before merging)
When adding a new method:
./lib/export-types.ts