StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


12»»

BusinessBindingSource and Field Level...Expand / Collapse
Author
Message
Posted 03/29/2007 2:52:47 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 08/30/2007 12:05:52 PM
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.

Post #7794
Posted 03/29/2007 3:05:50 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:50:35 PM
Posts: 4,796, Visits: 4,766
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.

Post #7796
Posted 03/29/2007 3:20:06 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 08/30/2007 12:05:52 PM
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

Post #7799
Posted 03/29/2007 3:32:35 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:50:35 PM
Posts: 4,796, Visits: 4,766
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.

Post #7801
Posted 03/29/2007 4:32:42 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 08/30/2007 12:05:52 PM
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.

Post #7804
Posted 03/29/2007 5:06:41 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 1:09:23 PM
Posts: 2,686, Visits: 1,888
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.


www.bungie.net
Post #7805
Posted 03/29/2007 5:10:58 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: Forum Members
Last Login: 10/31/2007 5:20:05 PM
Posts: 374, Visits: 1,197
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
Post #7806
Posted 03/29/2007 5:12:44 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: Forum Members
Last Login: 10/31/2007 5:20:05 PM
Posts: 374, Visits: 1,197
Sorry Trent, I meant to quote your screen shot, but I picked Fran's by mistake!

..ßen
Post #7807
Posted 03/29/2007 6:31:00 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 4:50:35 PM
Posts: 4,796, Visits: 4,766
No worries   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 )
Post #7809