I'm starting a new project, and I've a question about Custom role provider with ASP.Net MVC 3.
I need to have a role verification for several actions of my constructor, so I said me, okay easy, I can use the role provider.
The problem is that the role is depending of the current "context":
In fact users in my database are linked to several "entities", and have the role "A" for the entity X, and the role B for the entity Y. All data which will be displayed/edited are "childrens" of this entity
It's strictly separated: When we log in, we have to choose for which entity we want to work, and then, until we ask to change of entity, we will have only the data of this entity and rights of this entity.
The current "entity" will be stored in the session.
The goal is to have no unauthorized menu/action for the entity X, just because this right was allowed for user Y.
The problem is that in the role provider, I've no way to receive any context, I only receive the username.
So what you think I could do?(if it can help, the membership is also a custom membership provider).