Pregunta

I am new to the ASP.NET membership interface.

I understand how the User and Roles work with each other, but i cant seem to understand how to connect between the roles and the permissions.

The Membership and the Roles auto creates tables in my db, but I don't see any reference to the permissions aspect.

Any ideas?

¿Fue útil?

Solución

ASP.NET Membership works on the aspect that your application will provide checks for the roles that a user currently belongs to and handle the processing of permissions from there.

Simply put, in your application code, you will have to insert something similar to handle verifying a user has permission to a function:

if (Roles.IsUserInRole("RoleName")) {
    // Do something here
}

This essentially creates the premise of permissions, when a user is assigned a Role, they then can perform actions based on what the system allows them to in which the role(s) they belong to grants them the ability to do so.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top