Custom Role Provider

We are trying to implement a custom role provider for our web application. For authorization, we want to check one more field, such as the Facilityid for the registered user, and the role that he has. eg. my User1 having Role1 with Facility1 can access some option and the same user role for Facility2 has another option. This way we can extend the existing role / profile provider to authorize a user with this extra field along with the assigned role.

+2


a source to share


2 answers


Depending on how much you expect it, you can simply create the Facility1 and Facility2 roles, although they may share many of the same aspects. This way you don't need to extend the membership provider.



+1


a source


There can be n objects, so these roles do not look casual. If we can find a way by which we can transfer the Facilityid from the application to this role-playing security robot and get the corresponding role for the user just for this object.



0


a source







All Articles