tags:

views:

146

answers:

2

I have a WPF application with a WCF service layer and a SQL database. I now want to restrict elements of the application so that certain functions are only available to those users with a particular role. For example, you will only be able to navigate to the settings screen if you are an administrator.

I would like a user to be a member of 1 or more authorisation groups and each authorisation group to have 1 or more roles associated.

A long time ago I used AzMan (Authorisation Manager) to do a similar thing. Does anyone think that there are better approaches? Is AzMan "old news"? Alternatives?

Thanks.

A: 

Well I'd do (actually I already did) the following.

I guess you got your business rules (users, groups) defined in your SQL Database. So you could simply do the Authorisation at the UserControl level. Give each of your UserControls the property hasAuthorization and bind it to the isEnabled property. You can also bind it to the Visibility attribute.

Dänu
+1  A: 

I don't think azman is old news, we are still using it....

http://stackoverflow.com/questions/2366073/authorization-and-entitlement-solution-on-net-like-earlier-in-azman

Azman will do what you are asking....

Calanus
I hadn't appreciated that AzMan is still used by the latest Security Application Block (v5.0) so guess that confirms it is still current (http://msdn.microsoft.com/en-us/library/ff664771(PandP.50).aspx)
David Ward