[pmwiki-users] Community Wiki Vision

Patrick R. Michaud pmichaud at pobox.com
Sat Feb 24 16:23:49 CST 2007


On Sat, Feb 24, 2007 at 03:40:54PM -0600, Tegan Dowling wrote:
> On 2/24/07, Hans <design5 at softflow.co.uk> wrote:
> > Saturday, February 24, 2007, 8:06:25 PM, Philip wrote:
> > > The forum user could edit his own posts after posting,
> > > but not anyone else's. The event calendar would
> > > allow anyone to make a posting, but only that person could
> > > edit the posting
> >
> > Hi Philip,
> >
> > I have not seen an implementation where contributors
> > can only edit their own contributions, and not any others.
> 
> Does anyone have any ideas about how to do that part, using AuthUser,
> for instance?

    function OnlyAuthorEdits($pagename, &$page, &$new) {
      global $AuthId;
      if (@$AuthId && !PageExists($pagename) && !isset($new['passwdedit']))
        $new['passwdedit'] = "id:$AuthId";
    }

    array_unshift($EditFunctions, 'OnlyAuthorEdits');

With this in place, whenever a new page is created PmWiki will
automatically set the new page's edit permission to limit
editing to the userid that created the page.

Pm



More information about the pmwiki-users mailing list