Skip to content

Commit 24160b0

Browse files
committed
[NAE-1678] User impersonation
- improvements based on PR comments
1 parent 4d7e7bd commit 24160b0

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

projects/netgrif-components-core/src/assets/i18n/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@
466466
"impersonation": {
467467
"user": {
468468
"successfullyRepresented": "User successfully represented",
469-
"currentlyAlreadyRepresented": "User is already currently represented",
469+
"currentlyAlreadyRepresented": "User is already being represented by someone else",
470470
"currentlyLogged": "User is currently logged in"
471471
},
472472
"action": {

projects/netgrif-components-core/src/assets/i18n/sk.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@
466466
"impersonation": {
467467
"user": {
468468
"successfullyRepresented": "Používateľ bol úspešne zastúpený",
469-
"currentlyAlreadyRepresented": "Používateľ je momentálne už zastúpený",
469+
"currentlyAlreadyRepresented": "Používateľ je momentálne zastupovaný",
470470
"currentlyLogged": "Používateľ je momentálne prihlásený"
471471
},
472472
"action": {

projects/netgrif-components-core/src/lib/impersonation/services/impersonation-user-resource.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export class ImpersonationUserResourceService extends UserResourceService {
2020
this._IMPERSONATION_SERVER_URL = this.getResourceAddress('impersonation');
2121
}
2222

23-
public search(body: object, params?: Params): Observable<Page<UserResource>> {
24-
return this.provider.post$('/impersonate/search', this._IMPERSONATION_SERVER_URL, {query: (body as any).fulltext}, params)
23+
public search(body: {fulltext: string}, params?: Params): Observable<Page<UserResource>> {
24+
return this.provider.post$('/impersonate/search', this._IMPERSONATION_SERVER_URL, {query: body.fulltext}, params)
2525
.pipe(map((r) => this.getResourcePage<UserResource>(r, 'users')));
2626
}
2727
}

projects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate-list/admin-impersonate-list.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {AbstractUserAssignListComponent, UserListService} from '@netgrif/compone
1111
})
1212
export class AdminImpersonateListComponent extends AbstractUserAssignListComponent {
1313

14-
constructor(protected _userListService: UserListService) {
15-
super(_userListService);
14+
constructor(userListService: UserListService) {
15+
super(userListService);
1616
}
1717
}

projects/netgrif-components/src/lib/side-menu/content-components/admin-impersonate/admin-impersonate.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {AbstractUserAssignComponent, NAE_SIDE_MENU_CONTROL, SideMenuControl, Use
1616
}]
1717
})
1818
export class AdminImpersonateComponent extends AbstractUserAssignComponent {
19-
constructor(@Inject(NAE_SIDE_MENU_CONTROL) protected _sideMenuControl: SideMenuControl) {
20-
super(_sideMenuControl);
19+
constructor(@Inject(NAE_SIDE_MENU_CONTROL) sideMenuControl: SideMenuControl) {
20+
super(sideMenuControl);
2121
}
2222
}

0 commit comments

Comments
 (0)