8000 fix: only show editable orgs on deployment page by code-asher · Pull Request #14193 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

fix: only show editable orgs on deployment page #14193

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

Merged
merged 14 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
canEditOrganization was lying
  • Loading branch information
code-asher committed Aug 6, 2024
commit 9f39257b9ef32ab0f83f3fc4e96f40ee87e09b70
7 changes: 7 additions & 0 deletions site/src/api/queries/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ const orgChecks = (
},
action: "read",
},
editGroups: {
object: {
resource_type: "group",
organization_id: organizationId,
},
action: "update",
},
editOrganization: {
object: {
resource_type: "organization",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export const canEditOrganization = (
return (
permissions &&
(permissions.editOrganization ||
permissions.viewMembers ||
permissions.viewGroups)
permissions.editMembers ||
permissions.editGroups)
);
};

Expand Down
Loading
0