Merge remote-tracking branch 'origin/develop' into develop

* origin/develop:
  по умолчанию первоначалка открываться будет
  + ErvuCheckRole.ts
This commit is contained in:
Фоат Саляхов 2025-03-27 12:59:54 +03:00
commit f81eab879a
2 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,16 @@
import {AnalyticalScope, Behavior, Visible} from "@webbpm/base-package";
import {AuthorizationService} from "../modules/app/service/authorization.service";
@AnalyticalScope(Behavior)
export class ErvuCheckRole extends Behavior {
private authService: AuthorizationService;
initialize() {
this.authService = this.injector.get(AuthorizationService);
}
@Visible()
public hasRoles(roles: string[]): boolean {
return this.authService.hasAnyRole(roles);
}
}

View file

@ -13,7 +13,7 @@ const webbpmRoutes: Routes = [
},
{
path: '',
loadChildren: 'generated-sources/page-conversion.module#PageconversionModule',
loadChildren: 'generated-sources/page-initial_registration.module#Pageinitial_registrationModule',
canActivate: [ConfirmExitGuard, RolesGuard],
pathMatch: 'full',
},