Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Each Created Tenant should have Admin Role #100

Open
TanmayKhalikar opened this issue Jan 3, 2024 · 1 comment
Open

Each Created Tenant should have Admin Role #100

TanmayKhalikar opened this issue Jan 3, 2024 · 1 comment

Comments

@TanmayKhalikar
Copy link

Like in Example - 3 We can assign Tenant Admin Role or Tenant User Role to created Tenant. Same thing I want to Perform in Example No - 4 Hierarchical Tenant Creation so each created tenant by parent tenant should also get an Admin Role or User Role as per Tenant's Demand

@JonPSmith
Copy link
Owner

JonPSmith commented Jan 4, 2024

Hi @TanmayKhalikar,

I am not sure how you add an Tenant Admin Role or Tenant User Role to created Tenant like Example3. The typical way is to use the IAuthRolesAdminService service to add your two Roles (see this section in the AuthP's documentation).

You can use the IAuthRolesAdminService service with a Hierarchical multi-tenant application, but it has some differences:

  • The Tenant User is designed to control users at the same level or lower. For instance the Hierarchical multi-tenant example image shows a user called "Joe" who has access to the SanFran, Dress4U and Tie4U users. And a user at the "4U" can see all the data and control all the user in this tenant.
  • To get all the users that the Tenant Admin can control the code must the _authUsersAdmin.QueryAuthUsers(dataKey) with the Tenant Admin's dataKey - see this section the AuthP's documentation.

Example4 has this Tenant user feature in it - try logging into Example4's app and log in as "[email protected]" and then use "Auth Admin -> List all AuthUsers" and you will various users that the "[email protected]" can control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants