Authorization rules

Authorization rules

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


ajj3085 posted on Wednesday, November 29, 2006

Hi,

I have an object which has a property that is writable only if the object is new.  Is the best way to handle this to override the CanWriteProperty method, and always return false for that property if the object is old?  Or is there a better way to handle this?

Thanks
Andy

Wal972 replied on Thursday, November 30, 2006

You might want to set the individual properties set property to something like

Set

if me.IsNew(true) and CanWriteProperty(true) then

     property = value

End if

Brian Criswell replied on Thursday, November 30, 2006

I prefer to override CanWriteProperty as the ReadWriteAuthorization component can pick that up.

ajj3085 replied on Friday, December 01, 2006

Yes, that's definately an advantage.

Copyright (c) Marimer LLC