@vc-shell/framework 1.0.84 → 1.0.86
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/CHANGELOG.md +13 -0
- package/core/composables/useUser/index.ts +5 -5
- package/core/directives/index.ts +0 -1
- package/core/plugins/index.ts +1 -0
- package/core/plugins/permissions/index.ts +10 -0
- package/dist/core/directives/index.d.ts +0 -1
- package/dist/core/directives/index.d.ts.map +1 -1
- package/dist/core/plugins/index.d.ts +1 -0
- package/dist/core/plugins/index.d.ts.map +1 -1
- package/dist/core/plugins/permissions/index.d.ts +5 -0
- package/dist/core/plugins/permissions/index.d.ts.map +1 -0
- package/dist/framework.mjs +1596 -1605
- package/dist/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/core/directives/permissions/index.ts +0 -20
- package/dist/core/directives/permissions/index.d.ts +0 -3
- package/dist/core/directives/permissions/index.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [1.0.86](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.85...v1.0.86) (2023-06-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## [1.0.85](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.84...v1.0.85) (2023-06-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* check permissions plugin ([cc65272](https://github.com/VirtoCommerce/vc-shell/commit/cc65272d933e29f427b1403df2bdd627b15dd1e6))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
1
14
|
## [1.0.84](https://github.com/VirtoCommerce/vc-shell/compare/v1.0.83...v1.0.84) (2023-06-23)
|
|
2
15
|
|
|
3
16
|
|
|
@@ -115,7 +115,6 @@ export function useUser(): IUseUser {
|
|
|
115
115
|
|
|
116
116
|
if (externalSignInStorage.value && externalSignInStorage.value.providerType) {
|
|
117
117
|
externalSignOut(externalSignInStorage.value.providerType);
|
|
118
|
-
externalSignInStorage.value = null;
|
|
119
118
|
} else {
|
|
120
119
|
user.value = undefined;
|
|
121
120
|
authData.value = undefined;
|
|
@@ -249,7 +248,7 @@ export function useUser(): IUseUser {
|
|
|
249
248
|
return result;
|
|
250
249
|
}
|
|
251
250
|
|
|
252
|
-
async function externalSignIn(authenticationType: string
|
|
251
|
+
async function externalSignIn(authenticationType: string, returnUrl: string) {
|
|
253
252
|
try {
|
|
254
253
|
let url_ = base + "externalsignin?";
|
|
255
254
|
|
|
@@ -275,10 +274,11 @@ export function useUser(): IUseUser {
|
|
|
275
274
|
}
|
|
276
275
|
}
|
|
277
276
|
|
|
278
|
-
async function externalSignOut(authenticationType: string
|
|
277
|
+
async function externalSignOut(authenticationType: string): Promise<void> {
|
|
279
278
|
try {
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
externalSecurityClient.signOut(authenticationType);
|
|
280
|
+
|
|
281
|
+
externalSignInStorage.value = null;
|
|
282
282
|
} catch (e) {
|
|
283
283
|
console.error(e);
|
|
284
284
|
throw e;
|
package/core/directives/index.ts
CHANGED
package/core/plugins/index.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { usePermissions } from "./../../composables";
|
|
2
|
+
import { App } from "vue";
|
|
3
|
+
|
|
4
|
+
export const permissions = {
|
|
5
|
+
install(app: App) {
|
|
6
|
+
const { checkPermission } = usePermissions();
|
|
7
|
+
app.config.globalProperties.$hasAccess = checkPermission;
|
|
8
|
+
app.provide("$hasAccess", checkPermission);
|
|
9
|
+
},
|
|
10
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/directives/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/directives/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/plugins/permissions/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,eAAO,MAAM,WAAW;iBACT,GAAG;CAKjB,CAAC"}
|