@webitel/ui-sdk 25.10.24 → 25.10.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "25.10.
|
|
3
|
+
"version": "25.10.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { shallowReactive } from 'vue';
|
|
2
2
|
import { Client } from 'webitel-sdk';
|
|
3
3
|
|
|
4
|
-
import eventBus from '../../scripts/eventBus
|
|
5
|
-
import { endpoint, getConfig } from './config
|
|
4
|
+
import eventBus from '../../scripts/eventBus';
|
|
5
|
+
import { endpoint, getConfig } from './config';
|
|
6
6
|
import { WebSocketClientEvent } from './enums/WebSocketClientEvent';
|
|
7
|
-
import websocketErrorEventHandler from './websocketErrorEventHandler
|
|
7
|
+
import websocketErrorEventHandler from './websocketErrorEventHandler';
|
|
8
8
|
|
|
9
9
|
class WebSocketClientController {
|
|
10
10
|
cli = null;
|
|
@@ -38,6 +38,9 @@ export const createUserAccessStore = ({
|
|
|
38
38
|
|
|
39
39
|
const sectionVisibilityAccess = ref<SectionVisibilityMap>(new Map());
|
|
40
40
|
|
|
41
|
+
// Bypass mode for when no access data exists (new projects)
|
|
42
|
+
const bypassMode = ref<boolean>(false);
|
|
43
|
+
|
|
41
44
|
const hasAccess = (
|
|
42
45
|
action: CrudAction | SpecialGlobalAction,
|
|
43
46
|
object?: WtObject,
|
|
@@ -73,6 +76,8 @@ export const createUserAccessStore = ({
|
|
|
73
76
|
};
|
|
74
77
|
|
|
75
78
|
const hasSectionVisibility = (section: UiSection, object: WtObject) => {
|
|
79
|
+
if (bypassMode.value) return true;
|
|
80
|
+
|
|
76
81
|
const appOfSection = getWtAppByUiSection(section);
|
|
77
82
|
const objectOfSection = object; /*castUiSectionToWtObject(section)*/
|
|
78
83
|
const hasSectionVisibilityAccess = (section: UiSection) => {
|
|
@@ -123,6 +128,9 @@ export const createUserAccessStore = ({
|
|
|
123
128
|
scope: rawScopeAccess,
|
|
124
129
|
access: rawVisibilityAccess,
|
|
125
130
|
}: CreateUserAccessStoreRawAccess) => {
|
|
131
|
+
// Enable bypass mode if access data is null/undefined
|
|
132
|
+
bypassMode.value = rawVisibilityAccess === null;
|
|
133
|
+
|
|
126
134
|
globalAccess.value = makeGlobalAccessMap(rawGlobalAccess);
|
|
127
135
|
scopeAccess.value = makeScopeAccessMap(rawScopeAccess);
|
|
128
136
|
appVisibilityAccess.value = makeAppVisibilityMap(rawVisibilityAccess);
|