My Question:
Is there a generally accepted design pattern that I could use to make this happen?
But you can understand that I'd like to minimize the complexity attached to this change.
Incidentally, my application is an ASP.NET MVC 2 application, so if I could take advantage of any existing infrastructure, that would be great.
EDIT: I'm using Forms Authentication.
EDIT: I'll also need to track the fact that a super user is acting on behalf of another user. I'll need to do this for two reasons:
EDIT: @Jordão proposed a mostly workable solution. My only concern is the following - If the super user (while impersonating another user) navigates to the home screen, and the top of the screen says 'Hello [User]', I want it to say 'Hello [Impersonated User]' as opposed to 'Hello [Super User]'. And I'm afraid that @Jordão's solution would make the implementation of this screen and other screens with similar requirements more complex.
Don't impersonate other users, but give the super users enough authorizations and exclusive interfaces so that they can act on the other users' data.
If you then have logging or auditing data, you know which user (normal or super) acted on the data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With