1

I am using ASP.NET Boilerplate. I have defined a role named Customer and assigned many permissions to this role such as Create company and Delete company.

However, I want to give the user the possibility of controlling the permissions. Specifically I do not want some users with the role Customer to access all permissions assigned to this role. For example, I want the user Tim who has the role Customer to have access to Create company and Delete company but the user John, who also has the role Customer should only have access to Delete company. Can I do that?

I have tried using IPermissionManager to set the permissions for user like this : await permissionManager.SetForUserAsync(userId: userID, name: "CreateCompany", isGranted: false); The problem with this approach is the user is still has access to CreateCompany.

1
  • 1
    Just a thought but perhaps you need to create roles for each of of the base functions and manage them by grouping them for each type of customer Commented Jul 22, 2024 at 16:10

1 Answer 1

0

When you query the permissions API, you will be provided with role permissions of the children of company. And you can use that to control who access who roleId

Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.