feat(rbac): removed audit log option for time being, v3 secret patch and reload permission flash screen fix

This commit is contained in:
Akhil Mohan
2023-09-14 21:34:13 +05:30
parent 18d843f3e6
commit 942e1a82c2
5 changed files with 14 additions and 42 deletions
@@ -16,14 +16,6 @@ export const ProjectPermissionProvider = ({ children }: Props): JSX.Element => {
const workspaceId = currentWorkspace?._id || "";
const { data: permission, isLoading } = useGetUserProjectPermissions({ workspaceId });
if (!permission && currentWorkspace) {
return (
<div className="flex items-center justify-center w-screen h-screen bg-bunker-800">
Failed to load user permissions
</div>
);
}
if ((isLoading && currentWorkspace) || isWsLoading) {
return (
<div className="flex items-center justify-center w-screen h-screen bg-bunker-800">
@@ -37,6 +29,14 @@ export const ProjectPermissionProvider = ({ children }: Props): JSX.Element => {
);
}
if (!permission && currentWorkspace) {
return (
<div className="flex items-center justify-center w-screen h-screen bg-bunker-800">
Failed to load user permissions
</div>
);
}
return (
<ProjectPermissionContext.Provider value={permission!}>
{children}