mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 07:15:23 +02:00
CE specific unauthorized redirect
This commit is contained in:
parent
2d57a01245
commit
6bc6471562
3 changed files with 11 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue