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
Merge remote-tracking branch 'github/main' into asher/show-editable-orgs
  • Loading branch information
code-asher committed Aug 9, 2024
commit 9aca231d98b62fe4cd0698f01739bb587c5a8e37
13 changes: 10 additions & 3 deletions site/src/api/queries/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ export const organizationPermissions = (organizationId: string | undefined) => {
queryKey: ["organization", organizationId, "permissions"],
queryFn: () =>
// Only request what we use on individual org settings, members, and group
// pages, which at the moment is whether you can edit the members on the
// members page and whether you can see the create group button on the
// groups page. The edit organization check for the settings page is
// pages, which at the moment is whether you can edit the members or roles
// on the members page and whether you can see the create group button on
// the groups page. The edit organization check for the settings page is
// covered by the multi-org query at the moment, and the edit group check
// on the group page is done on the group itself, not the org, so neither
// show up here.
Expand All @@ -157,6 +157,13 @@ export const organizationPermissions = (organizationId: string | undefined) => {
},
action: "create",
},
assignOrgRole: {
object: {
resource_type: "assign_org_role",
organization_id: organizationId,
},
action: "create",
},
},
}),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export const SelectedOrgAdmin: Story = {
editMembers: true,
editGroups: true,
auditOrganization: true,
assignOrgRole: true,
},
},
],
Expand Down
2 changes: 2 additions & 0 deletions site/src/pages/ManagementSettingsPage/SidebarView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ interface OrganizationSettingsNavigationProps {
const OrganizationSettingsNavigation: FC<
OrganizationSettingsNavigationProps
> = ({ active, organization }) => {
const { experiments } = useDashboard();

return (
<>
<SidebarNavItem
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
0