[pmwiki-users] edit perms in Profiles

H. Fox haganfox at users.sourceforge.net
Tue Jul 3 22:46:17 CDT 2007


On 7/3/07, noskule <noskule at gmx.net> wrote:
> hi list
> is there a way to limit edit permission in the profiles group only for
> pages with the same name as the authors name, ie
>
> UserA can only edit Profiles.UserA but not Profiles.UserB

Try this local/Profiles.php script:

   <?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='browse'; }
   }

Hagan



More information about the pmwiki-users mailing list