@geomak/ui 6.22.0 → 6.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -3
- package/dist/index.d.ts +26 -3
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5884,6 +5884,7 @@ function SecureLayout({
|
|
|
5884
5884
|
permissions,
|
|
5885
5885
|
requiredPermissions,
|
|
5886
5886
|
requireAllPermissions,
|
|
5887
|
+
route,
|
|
5887
5888
|
canAccess,
|
|
5888
5889
|
loadingFallback,
|
|
5889
5890
|
fallback,
|
|
@@ -5921,8 +5922,13 @@ function SecureLayout({
|
|
|
5921
5922
|
} else if (!canAccess) {
|
|
5922
5923
|
finish(true);
|
|
5923
5924
|
} else {
|
|
5924
|
-
|
|
5925
|
-
|
|
5925
|
+
const result = canAccess(route);
|
|
5926
|
+
if (result && typeof result.then === "function") {
|
|
5927
|
+
setState("checking");
|
|
5928
|
+
result.then((ok) => finish(Boolean(ok)));
|
|
5929
|
+
} else {
|
|
5930
|
+
finish(Boolean(result));
|
|
5931
|
+
}
|
|
5926
5932
|
}
|
|
5927
5933
|
return () => {
|
|
5928
5934
|
cancelled = true;
|
|
@@ -5930,6 +5936,7 @@ function SecureLayout({
|
|
|
5930
5936
|
}, [
|
|
5931
5937
|
isAuthenticated,
|
|
5932
5938
|
token,
|
|
5939
|
+
route,
|
|
5933
5940
|
requireAllRoles,
|
|
5934
5941
|
requireAllPermissions,
|
|
5935
5942
|
canAccess,
|