Need to implement Application Role Management feature..
Looked at AZMan , I guess it is bit of a over kill for my application.
Thinking of using XML input , that has multiple hirarchay defining Roles. Given that some roles can participate (like Administrator) in all other (sub) roles.
Any recomondation highly appreciated
Need to implement Application Role Management feature.. Looked at AZMan , I guess it
Share
If I’m understanding the question correctly, you just need a role implementation that handles hierarchical roles.
One approach might be to implement a custom RoleProvider
If you had your role database setup something like (could also be a hierarchical XML file)
You could code your custom role provider such that if a user is explicitly assigned the admin role, they are “behind the scenes” given the admin role plus any sub roles. In this example, for a user explicitly assigned the “Admin” role, the
GetRolesForUsermethod would return “Admin, SubAdmin1, SubAdmin2”. In this way a call from your code to Roles.IsUserInRole(“SubAdmin2”) would return true for a user who was only explicitly assigned the “Admin” role.HTH