ReadWriteAuthorization Control and Vista

ReadWriteAuthorization Control and Vista

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


Curelom posted on Tuesday, December 12, 2006

Has anybody had any problems using the ReadWriteAuthorization control on Microsoft Vista?  It's not disabling any of the textbox or combobox controls for me on Vista, while it works fine on Windows XP. I'm running on CSLA 2.1.1

Curelom replied on Tuesday, December 12, 2006

Hold on.  I am getting the same problem in Windows XP.  I must be missing a method call somewhere.

ajj3085 replied on Tuesday, December 12, 2006

Curelom,

Some things that bit me when I started using the control.

If the authorization changes, you have to call ResetAuthorization (or something similar) on the RWAuth component itself.  I think you also have to call it initially after setting your data sources.

Also, CanWriteProperty must return false for the property.  One case where I wasn't returning false for a property is a BO that had only a public property getter, no public property setter.  If that's the case, the RWAuth won't disable the control, because it goes soley off the return value from CanWriteProperty.

Curelom replied on Tuesday, December 12, 2006

I have found the issue. I had completely forgotten about this, but apparently the fix didn't make it into CSLA 2.1.1

The issue can be found on this thread http://forums.lhotka.net/forums/thread/4859.aspx 

It has to do with binding either a filteredList or a sortedList.  The readWriteAuthorization Control gets lost using either of these.

Copyright (c) Marimer LLC