mirror of https://github.com/portainer/portainer
fix(auth): use pure admin [EE-6723]
parent
31f5b42962
commit
a0828c73fa
|
@ -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]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 'Name' but, in
|
The stack field below was previously labelled 'Name' but, in
|
||||||
fact, it's always been the stack name (hence the relabelling).
|
fact, it'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{' '}
|
||||||
|
|
Loading…
Reference in New Issue