StrataFrame Forum

4 Securities Users in Application

http://forum.strataframe.net/Topic32084.aspx

By Marcelo Blank - 6/4/2013

For compliance's issues , I need four securities users, each one with specific passwords and access log. 

Is it possible?





Regards,
By StrataFrame Team - 6/5/2013

You would have to change the source code to have 4 different usernames and passwords.  Like SecurityBasics.SecurityUserPassword1-4 and SecurityBasics.SecurityUsername1-4.  Without that, if you just create a regular user with only the permission to open the Security Editor, then that user could use the Security Editor to add extra permissions to the user account. 
By Marcelo Blank - 6/5/2013

I just try it... but doesn´t work.

It gets the last one as valid securit editor...

 //-- Set the administrative and security maintenance usernames and passwords
            SecurityBasics.AdministratorUserName = "admin";
            SecurityBasics.AdministratorPassword = "sgo1234";
            SecurityBasics.AdministratorUserPk = -1;

            SecurityBasics.SecurityMaintenanceUserName = "sec1";
            SecurityBasics.SecurityMaintenancePassword = "sgo1234";
            SecurityBasics.SecurityMaintenanceUserPk = -2;

            SecurityBasics.SecurityMaintenanceUserName = "sec2";
            SecurityBasics.SecurityMaintenancePassword = "sgo1234";
            SecurityBasics.SecurityMaintenanceUserPk = -3;

            SecurityBasics.SecurityMaintenanceUserName = "sec3";
            SecurityBasics.SecurityMaintenancePassword = "sgo1234";
            SecurityBasics.SecurityMaintenanceUserPk = -4;
By StrataFrame Team - 6/5/2013

Sorry, Marcelo, I wasn't very explicit.  You'll need to change the source code in the MicroFour StrataFrame Security project to have 4 different sets of security user properties:

Copy over the 3 properties on the SecurityBasics class so that you can set multiple, different username/password/pk combinations for the different security users you want to have.  You'll then need to change the Login.AuthenticateUser() method to check the additional security users as well.

Finally, you're code would change to this:

SecurityBasics.SecurityMaintenanceUserName1 = "sec1";
SecurityBasics.SecurityMaintenancePassword1 = "sgo1234";
SecurityBasics.SecurityMaintenanceUserPk1 = -2;

SecurityBasics.SecurityMaintenanceUserName2 = "sec2";
SecurityBasics.SecurityMaintenancePassword2 = "sgo1234";
SecurityBasics.SecurityMaintenanceUserPk2 = -3;

SecurityBasics.SecurityMaintenanceUserName3 = "sec3";
SecurityBasics.SecurityMaintenancePassword3 = "sgo1234";
SecurityBasics.SecurityMaintenanceUserPk3 = -4;
By Marcelo Blank - 6/5/2013

Ok.

Thanks for the orientation.

Regards.