How to check the access rights of an ASP.NET role

how can Ican use declarative security ("[PrincipalPermissionAttribute (SecurityAction.Demand, Role =" ")]) but I dont want to validate the role I need to check permissions for that role? scince I have roles and permissions for each role like can I use declarative security for permissions?

thanks for the help

0


source to share


2 answers


If you want to associate your roles with a permission table, you probably want to write your own class. I haven't read this link, but see if the following walkthrough helps ...



EDIT: Or you can store the permission values ​​inside each user's Profile , whether with one default provider or one that you developed yourself .

+1


source


Roles don't have permissions in asp.net ... they are rights.

Page.User.IsInRole ("FileUploader") Page.User.IsInRole ("Administrator")



http://msdn.microsoft.com/en-us/library/5k850zwb.aspx

-1


source







All Articles