integrated get permission for a specific user API #19

Merged
naeem.ullah merged 1 commits from aconnect-UX/1716 into dev-pending-09-12-2025 1 month ago

@ -127,20 +127,19 @@ export class UserPermissionsComponent {
onUserChange() {
this.showPermissions = true;
const params = new HttpParams().set(FormConstants.POR_ORGACODE, this.credentialService.getPorOrgacode())
.append(FormConstants.USER_ID, this.permission.get('userCode')?.value);
// this.httpService.requestGET(URIKey.USER_GET_PERMISSIONS, params).subscribe((response: any) => {
// if (!(response instanceof HttpErrorResponse)) {
// if (response.permission) {
// this.updatePermissions(JSON.parse(response.permission), this.permissions);
// }
// else {
// this.defaultPermissions().subscribe((data: PermissionNode[]) => {
// this.permissions = data;
// });
// }
// }
// })
const params = new HttpParams().set('userId', this.permission.get('userCode')?.value);
this.httpService.requestGET(URIKey.USER_GET_PERMISSIONS, params).subscribe((response: any) => {
if (!(response instanceof HttpErrorResponse)) {
if (response.permission) {
this.updatePermissions(JSON.parse(response.permission), this.permissions);
}
else {
this.defaultPermissions().subscribe((data: PermissionNode[]) => {
this.permissions = data;
});
}
}
})
}
savePermissions() {

@ -41,6 +41,11 @@
"Id" : "ENTITY_DELETE_USER",
"URI": "/user/deleteUser",
"UUID": "DELETE_USER"
},
{
"Id" : "ENTITY_USER_GET_PERMISSIONS",
"URI": "/user/getPermissions",
"UUID": "USER_GET_PERMISSIONS"
}
]
}

Loading…
Cancel
Save