[Zope] Business Rules, aqusition and Pointers...

Johan Carlsson johanc@torped.se
Mon, 8 Nov 1999 00:36:15 +0100


I have a problem I'm working with in Zope that
gave me an idea about how I would like to have
business rules implemented in Zope.

By business rules I mean logic expressions that
controls what methods and content is available.
Variable maybe current user or some user information,
browser, language preferences, and much more...

Here's my scenario:

I have to user userA and userB and I have to user
roles roleA and roleB.
I also have a folder object [the_folder] somewhere in my
Zope tree: /some_folder/the_folder.

What I want is to make the_folder contain different stuff
depending on which user accesses it.
I create to sub folder: folderA and folderB and assign
roleA to folderA and roleB to folderB. Both roleA and roleB
is assigned to the_folder.

What I would like to have here is the ability to add
Business Rules to the_folder:
if auth_user==userA: point to folderA
if auth_user==userB: point to folderB
...

The pointer results in that for userA the_folder appears
as folderA as if it was /some_folder/folderA.
Acquisition also should work it way from
folderA->some_folder->(PARENTS[-1]),
not folderA->the_folder->some_folder->(PARENTS[-1]).

Are there something wrong with this idea?
//johan