mirror of https://github.com/portainer/portainer
fix(auth): use pure admin [EE-6723]
parent
edea9e3481
commit
02611563f3
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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 'Name' but, in
|
||||
fact, it's always been the stack name (hence the relabelling).
|
||||
{isAdmin && (
|
||||
{isPureAdmin && (
|
||||
<>
|
||||
<br />
|
||||
Kubernetes Stacks functionality can be turned off entirely via{' '}
|
||||
|
|
Loading…
Reference in New Issue