Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
Funny you should ask this, I've been thinking about how to do this myself. Here's what I've come up with so far:
1. You can programatically login using Login.SetLoggedInUser(user, password, domain). This sets the SecurityBasics.CurrentUser. So, that's not hard.
2. You could have some menu/button/thing-a-ma-jig that would just call some preset users.
3. You also need to be able to make danged sure this doesn't deploy were you don't want it to. You could use a Compilation Constant, like DEBUG to include/exclude the code. However, that only works if the developer is the only one using this feature. I have a coworker who is my first tier tester, and it'd be nice if she could use it too...so I'm still thinking about the best way to do that.
I'm thinking about providing a little app that would create an encrypted XML file with the possible users, have that file get loaded so the user can just choose who to login as. Then this would only be available based on user/deployment type (I'm using clickonce, so I can discern deployment types (alpha, beta, prod) that way). Of course the uses would only be valid in a test environment.
Anyway, those are my thoughts on how to get this done. Hope that helps!
|