skip to Main Content

In a .net 5 MVC project that uses Identity for authentication, is there a built in option to manage the roles (crud) and user <> role relationships (add and removed roles to a user)?

I have found some tutorials that could work:

https://www.c-sharpcorner.com/article/adding-role-authorization-to-a-asp-net-mvc-core-application/
https://www.yogihosting.com/aspnet-core-identity-roles/

But before I go recreating the wheel, I just wanted to be sure there isn’t some functionality contained within the framework that I am missing.

Edit: Just to clarify, my question is regarding giving user roles e.g. Admin, manager, staff.
I’ve always used identity and always had to create my own logic for creating and assigning roles to users. But keep thinking there must be a standard way to do this.

2

Answers


  1. for different roles in multiple groups

    https://github.com/rogwool/two

    • Might have been better with a GroupId key in AspNetUserRoles
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search