Compare commits

...

1 Commits

Author SHA1 Message Date
testa113
a0828c73fa fix(auth): use pure admin [EE-6723]
Some checks are pending
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
2024-02-15 16:50:45 +13:00
2 changed files with 5 additions and 5 deletions

View File

@@ -18,11 +18,11 @@ export function useAdminOnlyRedirect(
) {
const router = useRouter();
const { isAdmin } = useCurrentUser();
const { isPureAdmin } = useCurrentUser();
useEffect(() => {
if (!isAdmin) {
if (!isPureAdmin) {
router.stateService.go(to, params);
}
}, [isAdmin, to, params, router.stateService]);
}, [isPureAdmin, to, params, router.stateService]);
}

View File

@@ -4,12 +4,12 @@ import { InsightsBox } from '@@/InsightsBox';
import { Link } from '@@/Link';
export function StackNameLabelInsight() {
const { isAdmin } = useCurrentUser();
const { isPureAdmin } = useCurrentUser();
const insightsBoxContent = (
<>
The stack field below was previously labelled &apos;Name&apos; but, in
fact, it&apos;s always been the stack name (hence the relabelling).
{isAdmin && (
{isPureAdmin && (
<>
<br />
Kubernetes Stacks functionality can be turned off entirely via{' '}