@volo/abp.ng.identity 11.0.0-rc.2 → 11.0.0

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.
@@ -3,7 +3,7 @@ import { inject, Injector, output, model, effect, Component, Injectable, Destroy
3
3
  import * as i1 from '@angular/forms';
4
4
  import { UntypedFormBuilder, FormsModule, FormBuilder, Validators, ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
5
5
  import { finalize, take, switchMap as switchMap$1, startWith, map as map$1, distinctUntilChanged, tap as tap$1, defaultIfEmpty, filter as filter$1 } from 'rxjs/operators';
6
- import { AutofocusDirective, LocalizationPipe, mapEnumToOptions, AbpWindowService, LocalizationService, SubscriptionService, InternalStore, ShortDateTimePipe, ListService, AuthService, ConfigStateService, generatePassword, ShowPasswordDirective, EnvironmentService, PermissionDirective, ReplaceableTemplateDirective, TrackByService, HtmlEncodePipe, escapeHtmlChars, getShortDateShortTimeFormat, TenantUserSharingStrategy, ReplaceableRouteContainerComponent, authGuard, permissionGuard, RouterOutletComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
6
+ import { AutofocusDirective, LocalizationPipe, mapEnumToOptions, AbpWindowService, LocalizationService, SubscriptionService, InternalStore, ShortDateTimePipe, ListService, AuthService, ConfigStateService, generatePassword, ShowPasswordDirective, EnvironmentService, PermissionService, PermissionDirective, ReplaceableTemplateDirective, TrackByService, HtmlEncodePipe, escapeHtmlChars, getShortDateShortTimeFormat, TenantUserSharingStrategy, ReplaceableRouteContainerComponent, authGuard, permissionGuard, RouterOutletComponent, LazyModuleFactory, CoreModule } from '@abp/ng.core';
7
7
  import { FormPropData, generateFormFromProps, FormProp, ExtensibleDateTimePickerComponent, ExtensibleTableComponent, ExtensibleFormComponent, EXTENSIONS_IDENTIFIER, EXTENSIONS_ACTION_DATA, EntityAction, EntityProp, ToolbarAction, ToolbarComponent, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps, ExtensibleModule } from '@abp/ng.components/extensible';
8
8
  import { ConfirmationService, ModalCloseDirective, ModalComponent, ButtonComponent, ToasterService, Confirmation, NgxDatatableDefaultDirective, NgxDatatableListDirective, getPasswordValidators, DisabledDirective, AbpVisibleDirective, LoadingDirective, ThemeSharedModule } from '@abp/ng.theme.shared';
9
9
  import { IdentityUserService, ImportUsersFromFileType, IdentityRoleService, OrganizationUnitService, IdentitySessionService, IdentityClaimTypeService, IdentitySecurityLogService } from '@volo/abp.ng.identity/proxy';
@@ -949,6 +949,7 @@ class InviteUsersModalComponent {
949
949
  this.toasterService = inject(ToasterService);
950
950
  this.confirmationService = inject(ConfirmationService);
951
951
  this.environmentService = inject(EnvironmentService);
952
+ this.permissionService = inject(PermissionService);
952
953
  this.list = inject((ListService));
953
954
  this.destroyRef = inject(DestroyRef);
954
955
  this.appName = computed(() => {
@@ -986,6 +987,10 @@ class InviteUsersModalComponent {
986
987
  }
987
988
  // ─── Invite Tab ───
988
989
  loadRoles() {
990
+ if (!this.permissionService.getGrantedPolicy('AbpIdentity.Users.Update.ManageRoles')) {
991
+ this.roles = [];
992
+ return;
993
+ }
989
994
  this.userService
990
995
  .getAssignableRoles()
991
996
  .pipe(takeUntilDestroyed(this.destroyRef))