@eintrek/erp-shell 0.1.24 → 0.1.26
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/auth/access-denied.d.ts +22 -0
- package/dist/auth/permission-provider.d.ts +6 -7
- package/dist/auth/permission-utils.d.ts +24 -7
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +90 -45
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +90 -43
- package/dist/index.js.map +1 -1
- package/dist/navigation/navigation-data-helpers.d.ts +6 -2
- package/dist/providers/permission-rules-context.d.ts +2 -2
- package/package.json +1 -1
|
@@ -2,8 +2,12 @@ import type { PermissionRulesMap } from "../providers/permission-rules-context";
|
|
|
2
2
|
import type { Module, Tool } from "./navigation-types";
|
|
3
3
|
/**
|
|
4
4
|
* True when the user's child-group segments include at least one of the
|
|
5
|
-
* groups required for `permissionRouteKey`.
|
|
6
|
-
*
|
|
5
|
+
* groups required for `permissionRouteKey`.
|
|
6
|
+
*
|
|
7
|
+
* Fail-closed:
|
|
8
|
+
* - Nav item without `permissionRouteKey` → deny (must declare a key)
|
|
9
|
+
* - Key absent from `rulesMap` → deny (unknown route is not public)
|
|
10
|
+
* - Key present with `required_child_groups: []` → allow (explicit public)
|
|
7
11
|
*/
|
|
8
12
|
export declare function canAccessNavPermissionRoute(permissionRouteKey: string | undefined, rulesMap: PermissionRulesMap, userChildSegments: string[]): boolean;
|
|
9
13
|
/** Footer tools — same JWT child-group rules as main nav. */
|
|
@@ -48,8 +48,8 @@ export interface PermissionRulesProviderProps {
|
|
|
48
48
|
*/
|
|
49
49
|
export declare function PermissionRulesProvider({ children, data, isLoading, isError, fallbackPolicies, }: PermissionRulesProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
50
50
|
/**
|
|
51
|
-
* Read the permission rules.
|
|
52
|
-
*
|
|
51
|
+
* Read the permission rules. Outside the provider, report loading so
|
|
52
|
+
* fail-closed consumers (nav / gates) do not treat empty maps as "allow all".
|
|
53
53
|
*/
|
|
54
54
|
export declare function usePermissionRules(): PermissionRulesContextValue;
|
|
55
55
|
export {};
|