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
764 stars 155 forks source link

Create admin user with tenant admin role #99

Open TechAspirant opened 6 months ago

TechAspirant commented 6 months ago

Hello,

I'm looking for guidance on creating a Tenant Admin User with the Tenant Admin Role for each new Tenant that gets created. I'm specifically referring to the Example4.MvcWebApp.IndividualAccounts project. How can I achieve this?

JonPSmith commented 6 months ago

Hi @TechAspirant,

Let me say back to you on what you are asking. You want every Tenant should have a Tenant Admin User - is that correct? If so here are two suggestions which relay on you create a "Tenant Admin" role (see Example4 for an example).

I also recommend you read the Building ASP.NET Core and EF Core multi-tenant apps – Part2: Administration which gives a good overview of administration.