I currently have Orchard 1.4 running for our company's internal self-service reporting application. I have a fairly extensive custom module that I've written to handle all of this.
Security in the application is done using the Windows Authentication module from AlexH so that when a user hits the site for the first time, LDAP is queried and an Orchard user is created using their login name. I also have the Contrib.Profile module installed
and extended the Windows Authentication module so that when the Orchard user is created, I write a few things out to some Profile fields to use on the site...mainly First Name, Last Name, and Employee ID.
Here's what I'm trying to do now, I'm just having a problem trying to envision how this will work.
When troubleshooting issues with the reporting application for users, it's extremely helpful to see the website as they would...basically this means that I want to be able to impersonate another user on the site without actually logging into their account
(which I can't do anyways because I'm using Windows Authentication).
So...my first thought is to extend the Windows Authentication module further to pass a specific username to the login sequence instead of the Windows username. Simple enough...I figured I could use the Profile module to create a boolean value named UserImpersonate
and a text value for the proposed username to impersonate. During the login sequence in the Windows Authentication module, I would check to see if the boolean value is true and then pass the text value to the login sequence instead of the Windows username.
All of this seemed like a great idea, except...how do I then turn that off and return to using Orchard as myself without having to login as a different user and "undo" the UserImpersonate checkbox from the admin side?
If anyone has thoughts on how I could possibly make this scenario work...using what I described above, or a different method if you think it could work better, I would very much appreciate some ideas on how to proceed with designing this.
Thanks so much for your ideas.