mirror of
https://github.com/portainer/portainer.git
synced 2025-08-07 23:05:26 +02:00
fix(kubernetes): create proxied kubeclient EE-4326 (#7850)
This commit is contained in:
parent
f6d6be90e4
commit
0c995ae1c8
18 changed files with 485 additions and 71 deletions
|
@ -123,6 +123,7 @@ interface AuthorizedProps {
|
|||
authorizations: string | string[];
|
||||
environmentId?: EnvironmentId;
|
||||
adminOnlyCE?: boolean;
|
||||
childrenUnauthorized?: ReactNode;
|
||||
}
|
||||
|
||||
export function Authorized({
|
||||
|
@ -130,6 +131,7 @@ export function Authorized({
|
|||
environmentId,
|
||||
adminOnlyCE = false,
|
||||
children,
|
||||
childrenUnauthorized = null,
|
||||
}: PropsWithChildren<AuthorizedProps>) {
|
||||
const isAllowed = useAuthorizations(
|
||||
authorizations,
|
||||
|
@ -137,7 +139,7 @@ export function Authorized({
|
|||
adminOnlyCE
|
||||
);
|
||||
|
||||
return isAllowed ? <>{children}</> : null;
|
||||
return isAllowed ? <>{children}</> : <>{childrenUnauthorized}</>;
|
||||
}
|
||||
|
||||
interface UserProviderProps {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue