[pmwiki-users] Fw: Setting up AuthUser and Upload
Petko Yotov
5ko at 5ko.fr
Sat Mar 12 13:52:08 CST 2011
On Saturday 12 March 2011 17:52:33, Al Louis Ripskis wrote :
> In the PmWiki site that I'm constructing I'm attempting to permit AuthUser
> to upload to a single upload directory after logging in. I inserted this
> in the beginning of my config.php:
>
> include_once("$FarmD/scripts/authuser.php");
>
> ## Enable uploads and set a site-wide default upload password.
> $EnableUpload = 1;
> $DefaultPasswords['upload'] = crypt('secret');
> $UploadPrefixFmt = '';
>
> Well it doesn't work. What have I done wrong?
This is tricky. If you enable AuthUser, your login form will have two fields,
username and password, but to gain "upload" permissions, in your case you'll
need to enter just the upload password, leaving the username field empty.
If you enter just the uploads password (which in your case is "secret" without
the quotes), without entering a username, it should work.
Instead of a special password crypt('secret'), you may want to allow any
logged-in user to upload: use rather 'id:Username', '@group' or 'id:*':
$DefaultPasswords['upload'] = array('id:*'); # all identified users ### OR
$DefaultPasswords['upload'] = array('@uploaders', '@admins'); # usergroups
More about user groups should be available at
http://www.pmwiki.org/wiki/PmWiki/AuthUser
Petko
P.S. If this doesn't seem to work, try moving the DefaultPasswords line before
the include_once one.
More information about the pmwiki-users
mailing list