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

pull/11188/head
testa113 2024-02-15 16:50:45 +13:00
parent 31f5b42962
commit a0828c73fa
2 changed files with 5 additions and 5 deletions

View File

@ -18,11 +18,11 @@ export function useAdminOnlyRedirect(
) { ) {
const router = useRouter(); const router = useRouter();
const { isAdmin } = useCurrentUser(); const { isPureAdmin } = useCurrentUser();
useEffect(() => { useEffect(() => {
if (!isAdmin) { if (!isPureAdmin) {
router.stateService.go(to, params); 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'; import { Link } from '@@/Link';
export function StackNameLabelInsight() { export function StackNameLabelInsight() {
const { isAdmin } = useCurrentUser(); const { isPureAdmin } = useCurrentUser();
const insightsBoxContent = ( const insightsBoxContent = (
<> <>
The stack field below was previously labelled &apos;Name&apos; but, in The stack field below was previously labelled &apos;Name&apos; but, in
fact, it&apos;s always been the stack name (hence the relabelling). fact, it&apos;s always been the stack name (hence the relabelling).
{isAdmin && ( {isPureAdmin && (
<> <>
<br /> <br />
Kubernetes Stacks functionality can be turned off entirely via{' '} Kubernetes Stacks functionality can be turned off entirely via{' '}