mirror of https://github.com/portainer/portainer
CE specific unauthorized redirect
parent
2d57a01245
commit
6bc6471562
|
@ -11,7 +11,10 @@ import { ClusterRoleBindingsDatatable } from './ClusterRoleBindingsDatatable/Clu
|
|||
|
||||
export function ClusterRolesView() {
|
||||
useUnauthorizedRedirect(
|
||||
{ authorizations: ['K8sClusterRoleBindingsW', 'K8sClusterRolesW'] },
|
||||
{
|
||||
authorizations: ['K8sClusterRoleBindingsW', 'K8sClusterRolesW'],
|
||||
adminOnlyCE: true,
|
||||
},
|
||||
{ to: 'kubernetes.dashboard' }
|
||||
);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { RoleBindingsDatatable } from './RoleBindingsDatatable';
|
|||
|
||||
export function RolesView() {
|
||||
useUnauthorizedRedirect(
|
||||
{ authorizations: ['K8sRoleBindingsW', 'K8sRolesW'] },
|
||||
{ authorizations: ['K8sRoleBindingsW', 'K8sRolesW'], adminOnlyCE: true },
|
||||
{ to: 'kubernetes.dashboard' }
|
||||
);
|
||||
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
import { useUnauthorizedRedirect } from '@/react/hooks/useUnauthorizedRedirect';
|
||||
|
||||
import { PageHeader } from '@@/PageHeader';
|
||||
|
||||
import { ServiceAccountsDatatable } from './ServiceAccountsDatatable';
|
||||
|
||||
export function ServiceAccountsView() {
|
||||
useUnauthorizedRedirect(
|
||||
{ authorizations: ['K8sServiceAccountsW'], adminOnlyCE: true },
|
||||
{ to: 'kubernetes.dashboard' }
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<PageHeader
|
||||
|
|
Loading…
Reference in New Issue