- ABP Framework version: v7.3.0
- UI Type: Angular
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes **Micro service **
I have a micro service (for example called Products Microservice) in that microservice I would like to check if a specific user has a permission, this user is not the current user, (I have his email only)
Kindly suggest all available solutions, the best solution that does not make me made connection to administration.
I think I need to use: var rs = await authorizationService.AuthorizeAsync(ClaimsPrincipal, requiredPolicy); but I do not have the (ClaimsPrincipal) and how can I get an instance of it related a specific user ? and is this good solution ?
Kindly advice
7 Answer(s)
-
0
hi
You can use
IPermissionIntegrationService
to checkuserId
's permissions.public class IsGrantedRequest { public Guid UserId { get; set; } public string[] PermissionNames { get; set; } }
-
0
Thank you for your prompt answer!
Please provide me with more details, I cannot find IPermissionIntegrationService I searched for it all my solution, Not sure which dependency should I use,
And finally Plaese provide with a blog or documentation reference for that is possible
Thank you
-
0
hi
This is an integrated app service from
PermissionManagement
.https://github.com/abpframework/abp/blob/dev/modules/permission-management/src/Volo.Abp.PermissionManagement.Application.Contracts/Volo/Abp/PermissionManagement/Integration/IPermissionIntegrationService.cs#L9
You can use it to check the permissions. it exists on
administration
service.https://docs.abp.io/en/commercial/latest/startup-templates/microservice/synchronous-interservice-communication
-
0
The solution was to create a reference for identity service module (not the administration service module)
using : https://docs.abp.io/en/commercial/latest/startup-templates/microservice/synchronous-interservice-communication
-
0
hi
Has your problem been solved? I see that you have closed this problem.
-
0
Yes It was solved, Thank you
The solution was to create a reference for identity service module (not the administration service module)
using : https://docs.abp.io/en/commercial/latest/startup-templates/microservice/synchronous-interservice-communication
-
0
Thanks