@abp/ng.core 9.2.0-rc.1 → 9.2.0-rc.2
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/fesm2022/abp-ng.core.mjs
CHANGED
|
@@ -4283,9 +4283,10 @@ class PermissionGuard {
|
|
|
4283
4283
|
const routeFound = findRoute(this.routesService, getRoutePath(this.router, state.url));
|
|
4284
4284
|
requiredPolicy = routeFound?.requiredPolicy;
|
|
4285
4285
|
}
|
|
4286
|
-
if (!requiredPolicy)
|
|
4286
|
+
if (!requiredPolicy) {
|
|
4287
4287
|
return of(true);
|
|
4288
|
-
|
|
4288
|
+
}
|
|
4289
|
+
return this.permissionService.getGrantedPolicy$(requiredPolicy).pipe(filter(Boolean), take(1), tap(access => {
|
|
4289
4290
|
if (!access && this.authService.isAuthenticated) {
|
|
4290
4291
|
this.httpErrorReporter.reportError({ status: 403 });
|
|
4291
4292
|
}
|
|
@@ -4311,9 +4312,10 @@ const permissionGuard = (route, state) => {
|
|
|
4311
4312
|
const routeFound = findRoute(routesService, getRoutePath(router, state.url));
|
|
4312
4313
|
requiredPolicy = routeFound?.requiredPolicy;
|
|
4313
4314
|
}
|
|
4314
|
-
if (!requiredPolicy)
|
|
4315
|
+
if (!requiredPolicy) {
|
|
4315
4316
|
return of(true);
|
|
4316
|
-
|
|
4317
|
+
}
|
|
4318
|
+
return permissionService.getGrantedPolicy$(requiredPolicy).pipe(filter(Boolean), take(1), tap(access => {
|
|
4317
4319
|
if (!access && authService.isAuthenticated) {
|
|
4318
4320
|
httpErrorReporter.reportError({ status: 403 });
|
|
4319
4321
|
}
|