Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: ensure user admins can always see users table #15226

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 33 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1ad09fa
refactor: update layout so that sidebar always shows
Parkreiner Oct 24, 2024
620bd3a
refactor: consolidate logic more
Parkreiner Oct 24, 2024
7ee3cf0
fix: add redirect for base users
Parkreiner Oct 24, 2024
e889621
fix: update routing logic to not block on disabled queries
Parkreiner Oct 24, 2024
36e0376
fix: update type misalignment
Parkreiner Oct 24, 2024
032a75c
chore: format and tidy up
Parkreiner Oct 24, 2024
eea8bbd
fix: make sure you can't navigate directly to bare /deployment page
Parkreiner Oct 24, 2024
e6d4201
fix: add more granularity to redirect logic
Parkreiner Oct 24, 2024
14fc68e
fix: prevent infinite redirect
Parkreiner Oct 24, 2024
a8fd9e6
fix: update redirects for /organizations routes
Parkreiner Oct 24, 2024
0a36cd1
fix: format files
Parkreiner Oct 24, 2024
e6d772b
fix: tighten up types for permissions
Parkreiner Oct 25, 2024
3752af5
Merge branch 'main' into mes/deploy-bug
Parkreiner Oct 25, 2024
2068a4c
fix: update route checks to account for subroutes
Parkreiner Oct 25, 2024
2fe3d53
fix: add e2e check to ensure that redirect hasn't happened
Parkreiner Oct 25, 2024
3c41de0
fix: update stories to account for new dashboard logic
Parkreiner Oct 25, 2024
162642e
fix: update out-of-date comment
Parkreiner Oct 25, 2024
64c6f29
fix: update default value logic for storybook setup
Parkreiner Oct 25, 2024
e12a4aa
fix: update individual stories
Parkreiner Oct 25, 2024
b9b33c0
fix: finish storybook injection changes
Parkreiner Oct 25, 2024
f7df5ff
fix: add back separate empty state to satisfy tests
Parkreiner Oct 25, 2024
6925294
fix: add tests and update code to account for missing cases
Parkreiner Oct 25, 2024
9fc0afa
fix: apply formatting
Parkreiner Oct 25, 2024
498e7ba
break out `DeploymentSettingsProvider`
aslilac Oct 28, 2024
234c606
fix: apply changes from previous PR
Parkreiner Oct 28, 2024
4496a75
fix: apply formatting
Parkreiner Oct 28, 2024
9fcf3e7
Merge branch 'main' into mes/deploy-bug
Parkreiner Oct 28, 2024
19fb6e5
Merge branch 'lilac/deployment-settings-provider' into mes/deploy-bug
Parkreiner Oct 28, 2024
804255e
fix: delete invalid tests
Parkreiner Oct 28, 2024
d341175
fix: revert changes not caught in merge
Parkreiner Oct 28, 2024
f3e6659
fix: update spellcheck
Parkreiner Oct 28, 2024
ce67a66
fix: revert nits
Parkreiner Oct 28, 2024
7e946a7
fix: apply feedback
Parkreiner Oct 29, 2024
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
fix: revert nits
  • Loading branch information
Parkreiner committed Oct 28, 2024
commit ce67a6631e3af4132dbb8c573cd455d64f64304c
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ export const CreateEditRolePage: FC = () => {
const queryClient = useQueryClient();
const navigate = useNavigate();

const { organizations } = useManagementSettings();
const { organization: organizationName, roleName } = useParams() as {
organization: string;
roleName: string;
};
const { organizations } = useManagementSettings();
const organization = organizations?.find((o) => o.name === organizationName);
const permissionsQuery = useQuery(organizationPermissions(organization?.id));

const createOrganizationRoleMutation = useMutation(
createOrganizationRole(queryClient, organizationName),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { displayError, displaySuccess } from "components/GlobalSnackbar/utils";
import { Loader } from "components/Loader/Loader";
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader";
import { Stack } from "components/Stack/Stack";
import { useDashboard } from "modules/dashboard/useDashboard";
import { useFeatureVisibility } from "modules/dashboard/useFeatureVisibility";
import { useManagementSettings } from "modules/management/ManagementSettingsLayout";
import { type FC, useEffect, useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { displayError } from "components/GlobalSnackbar/utils";
import { Loader } from "components/Loader/Loader";
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader";
import { Stack } from "components/Stack/Stack";
import { useDashboard } from "modules/dashboard/useDashboard";
import { useFeatureVisibility } from "modules/dashboard/useFeatureVisibility";
import { useManagementSettings } from "modules/management/ManagementSettingsLayout";
import { type FC, useEffect } from "react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { EmptyState } from "components/EmptyState/EmptyState";
import { Paywall } from "components/Paywall/Paywall";
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader";
import { Stack } from "components/Stack/Stack";
import { useDashboard } from "modules/dashboard/useDashboard";
import { useFeatureVisibility } from "modules/dashboard/useFeatureVisibility";
import { useManagementSettings } from "modules/management/ManagementSettingsLayout";
import type { FC } from "react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { displayError, displaySuccess } from "components/GlobalSnackbar/utils";
import { Loader } from "components/Loader/Loader";
import { Stack } from "components/Stack/Stack";
import { useAuthenticated } from "contexts/auth/RequireAuth";
import { useDashboard } from "modules/dashboard/useDashboard";
import { useManagementSettings } from "modules/management/ManagementSettingsLayout";
import { type FC, useState } from "react";
import { useMutation, useQuery, useQueryClient } from "react-query";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ const OrganizationProvisionersPage: FC = () => {
const { organization: organizationName } = useParams() as {
organization: string;
};
const { entitlements } = useDashboard();
const { organizations } = useManagementSettings();
const { entitlements } = useDashboard();
const { metadata } = useEmbeddedMetadata();
const buildInfoQuery = useQuery(buildInfo(metadata["build-info"]));
const provisionersQuery = useQuery(provisionerDaemonGroups(organizationName));

const organization = organizations?.find((o) => o.name === organizationName);
const provisionersQuery = useQuery(provisionerDaemonGroups(organizationName));

if (!organization) {
return <EmptyState message="Organization not found" />;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Meta, StoryObj } from "@storybook/react";
import { expect, within } from "@storybook/test";
import {
type Organization,
type Workspace,
type WorkspaceStatus,
WorkspaceStatuses,
Expand Down
Loading