Skip to content

Commit 5d9378b

Browse files
committed
fixup! Merge remote-tracking branch 'github/main' into asher/show-editable-orgs
1 parent 9aca231 commit 5d9378b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

site/src/api/queries/organizations.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ export const organizationsPermissions = (
185185
queryKey: ["organizations", organizationIds.sort(), "permissions"],
186186
queryFn: async () => {
187187
// Only request what we need for the sidebar, which is one edit permission
188-
// per sub-link (audit page, settings page, groups page, and members page)
189-
// that tells us whether to show that page, since we only show them if you
190-
// can edit (and not, at the moment if you can only view).
188+
// per sub-link (audit, settings, groups, roles, and members pages) that
189+
// tells us whether to show that page, since we only show them if you can
190+
// edit (and not, at the moment if you can only view).
191191
const checks = (organizationId: string) => ({
192192
editMembers: {
193193
object: {
@@ -217,6 +217,13 @@ export const organizationsPermissions = (
217217
},
218218
action: "read",
219219
},
220+
assignOrgRole: {
221+
object: {
222+
resource_type: "assign_org_role",
223+
organization_id: organizationId,
224+
},
225+
action: "create",
226+
},
220227
});
221228

222229
// The endpoint takes a flat array, so to avoid collisions prepend each

0 commit comments

Comments
 (0)