Replace AuthorizationRules member in BusinessBase with a hashtable

Replace AuthorizationRules member in BusinessBase with a hashtable

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


mikemir8 posted on Tuesday, December 11, 2007

I have some objects where I need to have different sets of authorization rules depending on the status of the object.

What I came up with is to have a hashtable of AuthorizationRules objects instead of one single AuthorizationRules object for my business object. For this, I'm creating my own base class that inherits from BusinessBase where I'm overriding CanReadProperty and CanWriteProperty to work with this new approach. No problem there.

However, I still don't know what to do with the AuthorizationRules member in BusinessBase. I will not be using this member at all, so my options are:

    * Name my hashtable AuthorizationRules and hide the old object.
    * Name my hashtable something like StatusAuthorizationRules and hide the old object.
    * Name my hashtable something like StatusAuthorizationRules and leave the old object visible.


I'm leaning towards option 1, but I'm not sure if this might have any implications since the type of AuthorizationRules would be changing. I'd like to what others think about this.

- Miguel

Copyright (c) Marimer LLC