fix(auth): use pure admin [EE-6723]

pull/11189/head
testa113 2024-02-15 16:52:25 +13:00
parent edea9e3481
commit 02611563f3
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{' '}