dimanche 10 mai 2015

Roles based authorization in MVC4

I am new to MVC and want to understand the authentication mechanism in MVC

I have these tables in SQL, Users table, Roles table and UserRoles table which maps user id column to role id column. Now as soon as I add an attribute Authorize(Roles = "Customer") I want the access to be given only to the users having customer priviliges. Now what is is that I have to do to create a link between these two. I am looking for a step by step explanation or a link which points me to do this exactly, as I found a number of articles googling out on this and was unable to find the matching one.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire