New Feature added: inheritance of wiki rights
Hi,
I am using tikiwiki 1.9. I really need to hand down the wiki rights to new added pages, so only users of one particular group can see new added pages in thei part of the wiki. Since nobody could tell me how this is done (without the use of structures) I coded this little feature myself.
in tiki-editpage.php, in the part just were the new site is create (just above where the structure hands down its rights) I added following code:
/* PATCH set page permissions */
$backlinks = $wikilib->get_backlinks($page);
if ($backlinks0'fromPage')
{
$userlib->copy_object_permissions($backlinks0'fromPage', $_REQUEST"page",'wiki page');
}
anything unclear, no problem just ask me!
This solves the problem so far, an perhaps this could be wrapped in the project (so I don't have to patch my tikiwiki with each update) but it's not perfect. If page, not realy existing so far, is linked twice or more often, always the rights of the first one in the array is used (which seems to be the last one linking the nonexisting page). But what happens if I want to create a page visible to more than one group? But this won't happen so often, at least I think...
Isn't there any namespaces for wiki already?? Isn't there a way to really create one wiki for each group???
greetings
Benedikt
EMail: BPletzer_at_gmx_dot_de