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

Petko Yotov 5ko at 5ko.fr
Mon Jan 21 02:50:34 CST 2008

On Monday 21 January 2008 09:25:20 imoc wrote:
> Thaks Petko.
> Yes the thread you point out did exact what I want. But I'm wondering if
> there is any simpler way to do that.
> Please correct me if I'm wrong. PM's code looks like it set specific
> 'edit password' for every page in creation. So if others want to edit
> the page they need to know the creator's password.

Okay, I will: you are wrong. :-)

This function does not set a specific password, but a specific (your) user id. 
This way, if you are logged in with the same username, you can edit the page. 
Other people, except the administrators, cannot. If you change your password, 
you can still edit the page.

> How about another approach that if someone want to edit a page, the script
> check whether the 'AuthId' is equal to the 'Author' or not. If yes, the
> person can edit the page. If not, he can't.

It does exactly this but does not check what you call "Author" from the last 
user who edited the page, but the stored original user id.

If it allowed only the user matching the {$LastModifiedBy} variable, an 
administrator who edits the page would effectively block the original author 
from editing.


More information about the pmwiki-users mailing list