JonPSmith / AuthPermissions.AspNetCore

This library provides extra authorization and multi-tenant features to an ASP.NET Core application.
https://www.thereformedprogrammer.net/finally-a-library-that-improves-role-authorization-in-asp-net-core/
MIT License
807 stars 161 forks source link

Is there any way to add a user in multiple tenants with different levels of permissions in each tenant? #56

Closed SalehBagheri closed 2 years ago

SalehBagheri commented 2 years ago

We have a private forum with multiple chat groups (tenants) and we have an intermediate-level moderator that has access to 5 or more chat groups, with different levels of permission. He has "modify and remove" permissions in 2 chat groups and is a normal user in other chat groups. How is it possible to implement it with this library?

JonPSmith commented 2 years ago

Hi @SalehBagheri,

I'm pretty sure this library can't help you. I say that because a user can't be in control of other groups (tenants) and also be a normal user in another group.

That's because of the "a user can only have one tenant" limitation (see the end of the Roadmap. If that limitation was taken away it might be possible, but a) the user would need to log out and log into their other tenant and b) its quite hard to implement and no one has asked for it.