-
Notifications
You must be signed in to change notification settings - Fork 874
chore: hide workspace creation UI for users without permission #16871
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
Conversation
03acbe3
to
124bf93
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.
maybe we should move the check I mentioned into modules/permissions so that it's more visible. maybe modules/permissions/workspaces.ts?
I definitely think we should keep this it's own thing, rather than tying to the organizationPermissions
query. other than that it all looks good!
createWorkspaces: { | ||
object: { | ||
resource_type: "workspace", | ||
organization_id: organizationId, | ||
owner_id: "*", | ||
}, | ||
action: "create", | ||
}, |
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.
this isn't really related to the rest of the permissions in this query.
we have a query in pages/CreateWorkspacePage/permissions.ts that could be used for this already (it's the exact same permission check, just by itself)
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.
moved to modules/permissions/workspaces.ts
363e6bb
to
6544543
Compare
636bf9c
to
3ecc9d9
Compare
resolves coder/internal#426