Slight problem with SecurityUser accessing Security Editor


Author
Message
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
You're most welcome. Cool
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
Yep ... works great ... thanks for saving me the time of digging into the security module myself!

C. T.

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Charles.

Your sample helped a lot, since as you stated, it didn't work over here either!

The thing is, I was testing with my applications, and I never remembered I had a fix on them already to make it work. It seems that there is a bug in the Security Module about the "SecurityMaintenanceKeyPrefix" and you can find all explanation about it on the following thread:

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

Anyway, the short answer for this is to add the following line in your Program.cs and then you should be fine:

SecurityBasics.SecurityMaintenanceKeyPrefix = "Security ";


Hope it helps.

Cheers.

Ivan
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
Hi Ivan:

Here is an example of the problem in a brand new StrataFrame WinForms app with Security.

Here is the project all zipped up ... I included the .bak file for the associated database but you probably will not need that.

Thanks for the continued support.

C. T.

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
I have tried to reproduce this issue on my environment and haven't been able to. If you don't mind creating a small sample application using the SF Sample Database which reproduces this behavior, please do it and upload it over here so I can see if I am able to find something.
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
The code snippet is the accurate data ... here is an illustration of the problem ... the video is still appropriate too.

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
It might just be a typo then, but in your original message you stated that you use "secusr" to login, but then you have set your security user as "SecurityUser", according to your last message.

Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
Yes ...

SecurityBasics.SecurityMaintenanceUserName = "SecurityUser";
SecurityBasics.SecurityMaintenancePassword = "secusr" + DateTime.Now.Day.ToString();
SecurityBasics.SecurityMaintenanceUserPk = -2;


Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
In the "AppMain.vb / Program.cs", have you set the SecurityMaintenanceUserName as bellow?

        SecurityBasics.SecurityMaintenanceUserName = "YourSecurityMaintenanceUsername"
        SecurityBasics.SecurityMaintenancePassword = "YourSecurityMaintenancePassword"
        SecurityBasics.SecurityMaintenanceUserPk = -2

Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
When I log into the application using "secusr" and password, I can test to see if that account has the permission to access the security editor or not (and appropriately enable or disable the associated button).  But, when I launch the form as "secusr" I receive a unhelpful error message "Access denied".

Here is a short video. 

if (SecurityBasics.CurrentUser.GetPermission("Security Editor").Action == PermissionAction.Grant)
   {
      cmdSecurity.Enabled = true;
   }
   else if (SecurityBasics.CurrentUser.UserPK == -2)
   {
      cmdSecurity.Enabled = true;
   }
   else
   {
   cmdSecurity.Enabled = false;
   }


Another oddity that shouldn't "be" is the request for "Security Editor" permission should be "Grant" for both the "secusr" and "administrator" account ... isn't that the way of it?

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search