[pmwiki-users] Setting page privs from config.php

Chris Cox ccox at endlessnow.com
Thu Oct 1 18:52:23 CDT 2009


On Thu, 2009-10-01 at 10:29 -0400, DaveG wrote:
> 
> On 10/1/2009 3:06 AM, Hans wrote:
> > Thursday, October 1, 2009, 4:28:29 AM, DaveG wrote:
> >
> >> Is there a way to set the permissions for a particular page from within
> >> config.php? I'd like to change the permissions of a single page in a
> >> group that is secured with an admin password, so the one page is secured
> >> with an edit password (ie, if I login with an edit password I can edit
> >> the page).
> >
> > page attributes like passwords are stored in the individual page file.
> > You couldset this from config.php by calling some custom function, which
> > will open the page file, then add or change the page attribute,
> > then save the page file. Maybe there is such a function already, but
> > I am not aware of it.
> Thanks -- I was looking for an exising function but didn't find one. 
> I'll take a look at setting the page attribute -- but might try to find 
> another way around the problem instead.

if ($pagename == 'Blah.Blah') {
        $DefaultPasswords['edit'] = "something";
}

???






More information about the pmwiki-users mailing list