Form Level security


Author
Message
Paul Chase
Paul Chase
Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
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.


StrataFrame Team
S
StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
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.

Paul Chase
Paul Chase
Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Ben,

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

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

StrataFrame Team
S
StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Oh, sorry...

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

Forgot the SecurityBasics class...

Paul Chase
Paul Chase
Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Never mind it is

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

and I get a grant permision


Paul Chase
Paul Chase
Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
I think im on to it..
Paul Chase
Paul Chase
Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)Advanced StrataFrame User (598 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
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

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, I am glad that you got it going Smile
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