@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 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 | undefined, returnUrl: string | undefined) {
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 | undefined): Promise<void> {
277
+ async function externalSignOut(authenticationType: string): Promise<void> {
279
278
  try {
280
- const url = base + "externalsignin/signout?authenticationType=" + authenticationType;
281
- window.location.href = url;
279
+ externalSecurityClient.signOut(authenticationType);
280
+
281
+ externalSignInStorage.value = null;
282
282
  } catch (e) {
283
283
  console.error(e);
284
284
  throw e;
@@ -1,3 +1,2 @@
1
- export * from "./permissions";
2
1
  export * from "./autofocus";
3
2
  export * from "./loading";
@@ -3,3 +3,4 @@ export * from "./i18n";
3
3
  export * from "./validation";
4
4
  export * from "./modularity";
5
5
  export * from "./signalR";
6
+ export * from "./permissions";
@@ -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,4 +1,3 @@
1
- export * from "./permissions";
2
1
  export * from "./autofocus";
3
2
  export * from "./loading";
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/directives/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/directives/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -3,4 +3,5 @@ export * from "./i18n";
3
3
  export * from "./validation";
4
4
  export * from "./modularity";
5
5
  export * from "./signalR";
6
+ export * from "./permissions";
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -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,5 @@
1
+ import { App } from "vue";
2
+ export declare const permissions: {
3
+ install(app: App): void;
4
+ };
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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"}