[pmwiki-users] $EnablePublish use

Scott Connard connard at dsg-inc.com
Wed May 9 08:27:05 CDT 2007


> Could someone please explain how $EnableDrafts and $EnablePublish  
> is meant
> to be used together ?
>
> On my system,
>
> with $EnableDrafts  = 1 and $EnablePublish = 0, using the edit  
> password, the
> "publish" button is active.
> with $EnableDrafts  = 1 and $EnablePublish = 1, using the edit  
> password, the
> "publish" button is greyed.
>
> with $EnableDrafts  = 1 and $EnablePublish = 1, using the admin  
> password,
> the "publish" button is active.
>
> Is it expected to be like this ?
>
> Christophe
>

$EnableDrafts simply enables the script scripts/draft.php which  
performs the draft processing, so that is absolutely required.
$EnablePublish seems to actually be $EnablePublishAttr (evidently Pm  
changed his mind while coding and didn't update his internal  
documentation) and turns on a publish password when ?action=attr is  
used to set passwords for a page.

You will see the Publish button whenever $EnableDrafts is on and you  
have publish permission.  Like other permissions, you can set them on  
a particular file (using ?action=attr) or via $DefaultPasswords 
['publish'] = crypt("publishpassword"); in a local/config.php or  
group config file.

I use AuthUser and set $DefaultPasswords['publish'] = '@publishers';  
and then defined a group of valid publishers.

Hope this helps,
Scott Connard.




More information about the pmwiki-users mailing list