Browse Source
Merge pull request #12300 from abpframework/issue-9581
Add proper title to Abp-permission-manager.component #9581
pull/12317/head
Muhammed Altuğ
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
11 additions and
4 deletions
-
npm/ng-packs/packages/identity/src/lib/components/users/users.component.html
-
npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts
-
npm/ng-packs/packages/identity/src/lib/defaults/default-users-entity-actions.ts
-
npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.html
-
npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts
|
|
|
@ -95,6 +95,7 @@ |
|
|
|
}; |
|
|
|
let init = initTemplate |
|
|
|
" |
|
|
|
[entityDisplayName]="entityDisplayName" |
|
|
|
(abpInit)="init(abpPermissionManagement)" |
|
|
|
> |
|
|
|
</abp-permission-management> |
|
|
|
|
|
|
|
@ -59,6 +59,8 @@ export class UsersComponent implements OnInit { |
|
|
|
|
|
|
|
permissionManagementKey = ePermissionManagementComponents.PermissionManagement; |
|
|
|
|
|
|
|
entityDisplayName: string; |
|
|
|
|
|
|
|
trackByFn: TrackByFunction<AbstractControl> = (index, item) => Object.keys(item)[0] || index; |
|
|
|
|
|
|
|
onVisiblePermissionChange = event => { |
|
|
|
@ -176,8 +178,9 @@ export class UsersComponent implements OnInit { |
|
|
|
this.list.hookToQuery(query => this.service.getList(query)).subscribe(res => (this.data = res)); |
|
|
|
} |
|
|
|
|
|
|
|
openPermissionsModal(providerKey: string) { |
|
|
|
openPermissionsModal(providerKey: string, entityDisplayName?: string) { |
|
|
|
this.providerKey = providerKey; |
|
|
|
this.entityDisplayName = entityDisplayName; |
|
|
|
setTimeout(() => { |
|
|
|
this.visiblePermissions = true; |
|
|
|
}, 0); |
|
|
|
|
|
|
|
@ -15,7 +15,7 @@ export const DEFAULT_USERS_ENTITY_ACTIONS = EntityAction.createMany<IdentityUser |
|
|
|
text: 'AbpIdentity::Permissions', |
|
|
|
action: data => { |
|
|
|
const component = data.getInjected(UsersComponent); |
|
|
|
component.openPermissionsModal(data.record.id); |
|
|
|
component.openPermissionsModal(data.record.id, data.record.userName); |
|
|
|
}, |
|
|
|
permission: 'AbpIdentity.Users.ManagePermissions', |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1,9 +1,9 @@ |
|
|
|
<abp-modal [(visible)]="visible" [busy]="modalBusy" [options]="{ size: 'lg' }"> |
|
|
|
<ng-container *ngIf="data.entityDisplayName"> |
|
|
|
<ng-container *ngIf="data.entityDisplayName || entityDisplayName"> |
|
|
|
<ng-template #abpHeader> |
|
|
|
<h4> |
|
|
|
{{ 'AbpPermissionManagement::Permissions' | abpLocalization }} - |
|
|
|
{{ data.entityDisplayName }} |
|
|
|
{{ entityDisplayName || data.entityDisplayName }} |
|
|
|
</h4> |
|
|
|
</ng-template> |
|
|
|
<ng-template #abpBody> |
|
|
|
|
|
|
|
@ -59,6 +59,9 @@ export class PermissionManagementComponent |
|
|
|
|
|
|
|
protected _visible = false; |
|
|
|
|
|
|
|
@Input() |
|
|
|
entityDisplayName: string | undefined; |
|
|
|
|
|
|
|
@Input() |
|
|
|
get visible(): boolean { |
|
|
|
return this._visible; |
|
|
|
|