I am writing an ASP.NET Core 1.1 web application. Now I am trying to setup my database so that it is ready for use but I am stomped at something that seems basic...
I am pretty familiar with Roles and somewhat with Claims. I know I can create a Claim of type ClaimTypes.Role. But when I am going to seed my Identity database with users, roles, etc. I am not clear on these items:
- Should I just create standard Roles using RoleManager only?
- Should I create a Claim of ClaimTypes.Role only?
- Should I do both for the system to work?
For example, I want to have roles Admin, Owner, Employee and Plain.
Admin
identity:full
Owner
identity:medium
billing:full
Employee
identity:low
billing:view
Plain
identity:low
By the way, the roles I want to create (each having one or more permissions as claims) should be valid for use in authorization (with the Authorize attribute on the controller).