Forum OpenACS Q&A: Re: Inheriting permissions from an object that is not the parent

Dave: there is not one root folder per project, as that is exactly the situation I want to avoid. I want 1 root folder per project-manager instance, with individual sub-folders inheriting permissions from the actual project they belong to.

Malte: care to elaborate? It sounds like you're on to something, but I don't get it.

Jade: I'm already working on that, I already have something that works, but it's far too much of a hack to release.

To be continued - all good ideas still welcome.

My basic idea was to get rid of the fixed child/parent relationship (1:1) but make it a flexible one (n:m) using relationships. Let's call it multiple_child_parent_rels for the moment. The CR and the permission system then would have to be ammended, to look in the multiple_child_parent_rels "table", if the current object has an entry there. If it does, go up to the parent object to get information from there (or the other way down for file-storage).

This way you could e.g. have an identical subfolder "marketing" in project A's files and project B's files.

Now for permissions, this would work exactly the same way. The permission system would look up the parent relationships from the relationship table. The user_id and role would then be probed against all possible permissions from the parents (instead of only one).

No clue how this impacts performance and if someone has thought about ammending the core in such a way. And please have patience for not being technically correct in my description, I'm just to lazy at the moment.