StrataFrame Forum

Form Level security

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

By Paul Chase - 11/17/2006

I am just starting to play around with this and cannot seem to get form level security to work. (I havent tried to secure anything else).

I have a user named testuser;have a role called test rolehave a persmision called SalesPerson it does not allow read only

I have the test role DENIED for this permision.

I set the form view security key to this permission and the test user can still do anything he wants to the on the form. Here are some pictures.. I am not sure where I am going wrong.. Shouldn't be rocket science so most likely it is something stupid.

By StrataFrame Team - 11/17/2006

Access to a form is only checked when the form is shown.  So, during the Show() command of the form, the security is checked, and the form is either allowed to show, or a message is shown to the user informing them that the form cannot be shown.

So, there is one of two things happening: 1) the form is being shown in some other way that is not checking security, or 2) the GetPermission() method of the CurrentUser object is returning the wrong value.

Let's start by checking the second option.  Put a break point somewhere after the user has logged into the system, and check the value of MicroFour.StrataFrame.Security.CurrentUser.GetPermission("Salesperson") and see what the return value is of that method.  It will return a PermissionInfo object that will contain the action to take.

By Paul Chase - 11/17/2006

Ben,

I am getting an error that current user is not a member of security

console.write(MicroFour.StrataFrame.Security.CurrentUser.GetPermission("Salesperson"))

By StrataFrame Team - 11/17/2006

Oh, sorry...

MicroFour.StrataFrame.Security.SecurityBasics.CurrentUser.GetPermission("Salesperson")

Forgot the SecurityBasics class...

By Paul Chase - 11/17/2006

Never mind it is

Console.WriteLine(SecurityBasics.CurrentUser.GetPermission("Salesperson").Action)

and I get a grant permision

By Paul Chase - 11/17/2006

I think im on to it..
By Paul Chase - 11/17/2006

Ben,

I have it working properly now. I am not sure exactly where it got messed up but I originally assigned the test user to the wrong role. I fixed that and redeployed the data but for  whatever reason he was still assigned to the manager role on the local data and thus had access to the salesperson form. Redploying using DDT did not seem to change this on the local security tables. To verify I added a new user and redployed and the new user did exist in the local tables. I ended up droppping the local table and redeploying and everything works as advertised.

P

By Trent L. Taylor - 11/17/2006

Well, I am glad that you got it going Smile