- I need to login users both with username/password as well as with badges.
- To handle badges I was just going to store the logged in user in system.util.getGlobals(), but I have extensively used Ignition’s security system for controlled access to each component.
Previous Forum Posts:
Set User Role at runtime
User was never answered by anyone.
Need advice for best way to switch user
User was never answered.
Possible (Bad) Solutions:
- From what I can tell, others may be using the badge number as the password to work around this problem. Doing this would create a security hole and is a last resort.
- Another solution would be to remove Ignition security from everything already built and add a script to each window to enable/disable components. This would be very time consuming, given the number of projects and windows.
- Have a dummy account, change the roles of that account, login with that account, change the roles back to nothing for that account. Since the client does not handle updates to roles while a user is logged in, this will work. This is a race condition though, so it is possible clients opening at the same time will not open with the appropriate roles. Also updates to roles in the UserProfile would have to be somehow updated.
- Does anyone know of a way to set the roles in the client at runtime without logging the user in, so that the Ignition security system can still be used?