[pmwiki-users] Limiting authors to edit pages they created

imoc blog.oc at gmail.com
Sat Jan 19 22:07:14 CST 2008


I'm wondering if it is possible to limit the authors' edit right
that they can only edit the pages created by themselves? 

I've found a recipe in 'pmwiki.org' that make authors can only 
edit their own pages in the Profiles group: 'Cookbook/Edit-RestrictedProfile'
The recipe is placing the following code in 'local/Profiles.php'

--------------------------------------------------------
<?php if (!defined('PmWiki')) exit();
## Author's name must match the page name in order to edit.
if ($action == 'edit' && ! CondAuth(@$pagename, 'admin')) {
  @include_once($FarmD.'/scripts/author.php');
  if ($Author && $Author != @PageVar($pagename, '$Name')) {
    $action='login'; }
}
--------------------------------------------------------

Since I know nothing about php. Can the method above be easily
modified to do the work I want? Thank for help.

Cheers,
imoc




More information about the pmwiki-users mailing list