I want to create a website with various users. The users can have different roles, admin and user, which is a very well documented situation. But I would like to also group the users on their location, so at each location I can have both admins and users. - A multi dimensional role system?
The reason is, that users in Germany should have access to a certain set of documents, while the Italian users shouldn't.
Where should I look for documentation on this specific topic? I need some way to limit my search, maybe some keywords.
You might want to look at custom profile properties. MSDN
A different approach would be to add another set of roles, corresponding with the different locations available, for example
Germany
andItaly
. You then make all German users members of theGermany
role, and the German admins members of bothGermany
andAdmin
. When checking permissions, you then check both forAdmin
and for the current locale.Remember, one user can have many roles.
First of all, please see the very excellent tutorial series on 4GuysFromRolla: http://aspnet.4guysfromrolla.com/articles/120705-1.aspx
Secondly, the built in Role Provider is extremely rudimentary. You associate a user with a string (role) and that's pretty much it. There's no heirarchy or additional properties that you associate with the role, unless you pack in into the string (role name).