@webitel/ui-sdk 26.8.133 → 26.8.134
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.
|
@@ -17,7 +17,7 @@ export declare const createUserinfoStore: () => import("pinia").StoreDefinition<
|
|
|
17
17
|
object: WtObject;
|
|
18
18
|
app: import("../../../enums").WtApplication;
|
|
19
19
|
}) => boolean;
|
|
20
|
-
routeAccessGuard: import("
|
|
20
|
+
routeAccessGuard: import("../types/UserAccess").RouteAccessGuard;
|
|
21
21
|
hasGlobalCrudActionAccess: (action: import("../../../enums").CrudAction) => boolean;
|
|
22
22
|
hasSpecialGlobalActionAccess: (id: import("..").SpecialGlobalAction) => boolean;
|
|
23
23
|
hasApplicationVisibility: (app: import("../../../enums").WtApplication) => boolean;
|
|
@@ -39,7 +39,7 @@ export declare const createUserinfoStore: () => import("pinia").StoreDefinition<
|
|
|
39
39
|
object: WtObject;
|
|
40
40
|
app: import("../../../enums").WtApplication;
|
|
41
41
|
}) => boolean;
|
|
42
|
-
routeAccessGuard: import("
|
|
42
|
+
routeAccessGuard: import("../types/UserAccess").RouteAccessGuard;
|
|
43
43
|
hasGlobalCrudActionAccess: (action: import("../../../enums").CrudAction) => boolean;
|
|
44
44
|
hasSpecialGlobalActionAccess: (id: import("..").SpecialGlobalAction) => boolean;
|
|
45
45
|
hasApplicationVisibility: (app: import("../../../enums").WtApplication) => boolean;
|
|
@@ -61,7 +61,7 @@ export declare const createUserinfoStore: () => import("pinia").StoreDefinition<
|
|
|
61
61
|
object: WtObject;
|
|
62
62
|
app: import("../../../enums").WtApplication;
|
|
63
63
|
}) => boolean;
|
|
64
|
-
routeAccessGuard: import("
|
|
64
|
+
routeAccessGuard: import("../types/UserAccess").RouteAccessGuard;
|
|
65
65
|
hasGlobalCrudActionAccess: (action: import("../../../enums").CrudAction) => boolean;
|
|
66
66
|
hasSpecialGlobalActionAccess: (id: import("..").SpecialGlobalAction) => boolean;
|
|
67
67
|
hasApplicationVisibility: (app: import("../../../enums").WtApplication) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RouteLocationNormalized, RouteLocationResolved } from 'vue-router';
|
|
2
2
|
import type { AdminSections, AuditorSections, CrmSections, CrudAction, SupervisorSections, WfmSections, WtApplication, WtObject } from '../../../enums';
|
|
3
3
|
import type { ApplicationsAccessSchema } from '../classes/ApplicationsAccess';
|
|
4
4
|
import type { CrudGlobalAction, ScopeClass, SpecialGlobalAction, WebitelLicense } from '../enums';
|
|
@@ -74,13 +74,25 @@ export type AppVisibilityMap = Map<WtApplication, boolean>;
|
|
|
74
74
|
* Map is used for quick access to user permissions
|
|
75
75
|
* */
|
|
76
76
|
export type SectionVisibilityMap = Map<FullUiSectionName, boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* [Claude] Route that access is checked for: a navigation target or a result of
|
|
79
|
+
* [Claude] `router.resolve()` (its `name` may be `null`).
|
|
80
|
+
*/
|
|
81
|
+
export type AccessGuardRoute = RouteLocationNormalized | RouteLocationResolved;
|
|
82
|
+
/**
|
|
83
|
+
* [Claude] Checks route access by `to` only, so it can be called directly to get
|
|
84
|
+
* [Claude] a verdict (`=== true`) and still be passed to `router.beforeEach`.
|
|
85
|
+
*/
|
|
86
|
+
export type RouteAccessGuard = (to: AccessGuardRoute) => true | {
|
|
87
|
+
path: string;
|
|
88
|
+
};
|
|
77
89
|
export interface UserAccessStore {
|
|
78
90
|
initialize: (rawAccess: CreateUserAccessStoreRawAccess) => void;
|
|
79
91
|
hasReadAccess: (object?: WtObject) => boolean;
|
|
80
92
|
hasCreateAccess: (object?: WtObject) => boolean;
|
|
81
93
|
hasUpdateAccess: (object?: WtObject) => boolean;
|
|
82
94
|
hasDeleteAccess: (object?: WtObject) => boolean;
|
|
83
|
-
routeAccessGuard:
|
|
95
|
+
routeAccessGuard: RouteAccessGuard;
|
|
84
96
|
hasSpecialGlobalActionAccess: (id: SpecialGlobalAction) => boolean;
|
|
85
97
|
hasGlobalCrudActionAccess: (action: CrudAction) => boolean;
|
|
86
98
|
hasLicense: (license: WebitelLicense) => boolean;
|