I've got functionality in an application that allows me to log on as a specific user; that allows me to test the security for that user or a class of users.
The problem is that part of the functionality for the app is to write config files to the user's profile that saves form/grid state. When I do this with my admin account, I end up writing a config file that has my security; and then when the user logs on that can't access the config file and that generates a permissions error (can't open file)
So... Below is code to add myself AND the user to the security profile for a folder so that we're both covered. No more perm errors.