BusinessBindingSource and Field Level Secuirty.


Author
Message
fparker
fparker
StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)
Group: Forum Members
Posts: 31, Visits: 199
Hello,

I have bound a business object to a ComponentOne grid through an instance of the BusinessBindingSource object.  When I attached security keys to some of the business object's fields, it didn't seem to have any affect on the grid - users who do not have access to a field will be able to see it on the grid.  Does field level security not work with the BusinessBindingSource object or am I doing something wrong?  Thanks for your help.

Fran Parker

MaxQ Technologies, Inc.

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
Does field level security not work with the BusinessBindingSource object or am I doing something wrong?

These security fields will not be respected by the grid as far as showing up.  Now if you use the replace with character then you will see the replacement character rather than the actual value.

fparker
fparker
StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)
Group: Forum Members
Posts: 31, Visits: 199
Trent,

Thanks for the quick reply.  I must be doing something wrong.  I used the Security Editor to create a permission with a denied action of "Replace Each Character".  I then assigned that permission to a field of a grid bound business object and also to a field of a non-grid bound business object.  My program includes the following two lines:

SecurityBasics.DefaultBlockedMsg = "Access Denied.";

SecurityBasics.BlockedReplacementCharacter = '*';

When a user without the permission in question loads a record into the screen, the text box bound to the non-grid object's field will be filled with "Access Denied.".  However, the grid column bound to the field in question shows the field's data.  Any idea what I might have missed?  Thanks again.

Fran


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
You have to set the permission of the action to "Replace Each Character" in order for the replacement text to work properly.

This logic is done within the BO and the property.  I recommend binding the field to a regulary SF text box until you get the results you are looking for so you know that the BBS is not in the formula.

fparker
fparker
StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)StrataFrame Beginner (31 reputation)
Group: Forum Members
Posts: 31, Visits: 199
Trent,

I was already using "Replace Each Character".  I did as you suggested, however, and created a new project using the "StrataFrame Windows Application with Security" template.  I then dropped text boxes bound to both of my business objects onto Form1.  When a user without the required permission runs the test screen, the boxes bound to the fields in question both contain "Access Denied." rather than the replacement character.  Any thoughts?  Thanks.

Fran.

StrataFrame Team
S
StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)StrataFrame Developer (4.3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
After the user logs in, add a breakpoint somewhere in your app (doesn't matter where) and in the watch window, check the value of the MicroFour.StrataFrame.Security.SecurityBasics.CurrentUser.GetPermission("<permissionname>"); where you replace <permissionname> with the name of the permission you assigned to the user.  The returned value will be a PermissionInfo object that will contain the access level and the blocked message.  Check to see if the DeniedAction is Message or if it is ReplaceEachChar. 

The second thing you can check is the CheckFieldSecurity event on the business object.  When you handle the event on the form, you the event args will contain the values that are going to be used to block/replace the message.  Check those 2 things and let me know.

Ben Hayat
Ben Hayat
Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
fparker (03/29/2007)
Trent,



Thanks for the quick reply. I must be doing something wrong. I used the Security Editor to create a permission with a denied action of "Replace Each Character". I then assigned that permission to a field of a grid bound business object and also to a field of a non-grid bound business object. My program includes the following two lines:



SecurityBasics.DefaultBlockedMsg = "Access Denied.";



SecurityBasics.BlockedReplacementCharacter = '*';



When a user without the permission in question loads a record into the screen, the text box bound to the non-grid object's field will be filled with "Access Denied.". However, the grid column bound to the field in question shows the field's data. Any idea what I might have missed? Thanks again.



Fran




Trent, nice screen shot! Would you mind shareing what tool did you use to make the borders of the screen shot like that and also dim the color of the shot and then hightlight the area?



Or did you use the capabilities of the "InstantForum" to do so?

Thanks!

..ßen
Ben Hayat
Ben Hayat
Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Sorry Trent, I meant to quote your screen shot, but I picked Fran's by mistake!

..ßen
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
No worries Smile  We use Snagit from Tech Smith.  We have met these guys before and they not only have a great product but are really good people as well.   (www.snagit.com )
Ben Hayat
Ben Hayat
Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Trent L. Taylor (03/29/2007)
No worries Smile We use Snagit from Tech Smith. We have met these guys before and they not only have a great product but are really good people as well. (www.snagit.com )




Thanks Trent. You did a nice job on the screen shot. Nice & clean!

..ßen
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