Allow Write on Property

Allow Write on Property

Old forum URL: forums.lhotka.net/forums/t/5329.aspx


jfreeman posted on Friday, August 29, 2008

I have an Object that I want to restrict some users from modifying certain properties on.  I know I can use the ValidationRules.AllowWrite method to give write access to the groups I want to update the field.  For the users not in that group, the WinForm allows them to change the data in a textbox and then show the error in the error provider.  Which is fine.  However, they are then stuck in that textbox and unable to navigate to any other field.  What am I missing?  Thanks.

Jonathan

 

ajj3085 replied on Friday, August 29, 2008

You should add a ReadWriteAuthorization component, which is part of Csla.  Make sure that ApplyAuthorization is true for the control bound to the property you're restricting.  The RWA component will make sure the control is put into either readonly or disabled, if the control doesn't support ReadOnly.

Copyright (c) Marimer LLC