Base solution for your next web application
Open Closed

Get Current User information in an angular component #3151


User avatar
0
malomatia created

I want to get the current information for the logged in user from an angular component:

  • The OUs he is part of
  • the Roles he has

i found : this._userService.getUserForEdit(this.appSession.userId).subscribe(result => { console.log(result);
});

but when i use it with non admin user, it gives the below response:

code : 0 details : null message : "[At least one of these permissions must be granted]" validationErrors : null


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can use GetCurrentLoginInformations in SessionAppService or in a better way, you can add another method to SessionAppService.

    If you want to use GetCurrentLoginInformations, you need to modify it. I suggest you to create a new method similar to GetCurrentLoginInformations in SessionAppService and use it.

    Thanks.