Martijn Korse wrote:
It's more or less what you proposed earlier, but without the need for static
variables.

Yup, I'd more or less come to the same conclusion (see my earlier reply which says:

"I think I am actually very happy with my original suggestion albeit it was a little contrived to keep the Resources as individual objects in their own right and used static values to get round a problem. In actual fact Resources should not just be individual objects, but they should really be the objects in their own right that also implement Zend_Acl_Resource_Interface.

My Article object should implement Zend_Acl_Resource_Interface"

So yes I concur :)

And if a resource/article has also knowledge about the category it's in you
could also decide that it requests the owner-id of the category and use
that.

Exactly. Different asserts can check for different logical conditions like this in a very configurable way without cluttering up controller or action logic.

Thanks for the help.

Col



--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

Reply via email to