Reputation: 1046
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?
Upvotes: 0
Views: 998
Reputation: 554
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.
Upvotes: 2