Hello, I am trying to create a fairly simple FAQ page that relies on AD groups for determining editing privileges. Right now, I am using the WindowsTokenRoleProvider for role management. Let's say I have groups DOMAIN\Group1 and DOMAIN\Group2 in AD. Let's also say that I have I have Category1 and Category2 in my FAQ, which Group1 and Group2 users should have the rights to access, respectively. What is a good way to implement these privileges?
Right now, I have the following:
if (EditingCategory == 1 && Roles.IsUserInRole(@"DOMAIN\Group1")) {
// show edit controls
} else if (EditingCategory == 2 && Roles.IsUserInRole(@"DOMAIN\Group2")) {
// show edit controls
} else
Response.Write("You do not have privileges to modify this category");Obviously, this is a poor way to accomplish this: the privileges are hard-coded into the application, so I ...
Go to the complete details ...