[pmwiki-users] Users & Groups

Peter Bowers pbowers at pobox.com
Thu Jul 31 04:50:43 CDT 2014


On Thu, Jul 31, 2014 at 5:27 AM, Steve Fletcher <fletch.au at outlook.com>
wrote:

> Hi,
>
> Another newbie question.
>
>
>
> I have read lots, but am still grappling to work out how to get it to work.
>
>
>
> I can create users
>
> # alice: (:encrypt wonderland:) within the config.php file
>
>
No, you're confusing your config.php with your *page* SiteAdmin.AuthUser.

There are 2 (primary) ways to organize users (without getting into other
schema via recipes): plain vanilla passwords and usernames/groups via
AuthUser.

It appears that you want users and groups, so you will need to use the
latter.

Read carefully through this page: http://www.pmwiki.org/wiki/PmWiki/AuthUser

This page (referenced in the above) is also very helpful:
http://www.pmwiki.org/wiki/Cookbook/QuickStartForAuthUser

Do note that AuthUser is a slightly more complicated approach to
authorization/authentication and the simpler approach is the default one.
 Thus you cannot skip any steps in actually activating AuthUser - it is NOT
activated "out of the box."

Note particularly that the line you have above ("alice: (:encrypt
wonderland:)") must appear in the SiteAdmin.AuthUser page, not the
config.php script, and lines like that must NOT be preceded by the hash
symbol (#).


>
>
> Do I create groups in theconfig.php file also?
>
> @designer: alice, bob
>
> This that you have referred to above ("@designer: alice, bob") also goes
in SiteAdmin.AuthUser and NOT in config.php.

You can do your user/group setup in your config.php script (thus bypassing
the SiteAdmin.AuthUser page) by modifying the $DefaultPasswords
<http://www.pmwiki.org/wiki/PmWiki/SecurityVariables#DefaultPasswords>
variable.
 Personally I would recommend that you not do that but rather stick with
the SiteAdmin.AuthUser method unless you already have experience in PHP
scripting.  The syntax for SiteAdmin.AuthUser is pretty simple while PHP is
obviously quite a bit more complex.


>
>
> How do I then make only the “designer” group able to update pages within the menu item
>
>
>

Once you have authentication working (via the documentation in the URLs I
referred to above) then you are ready to start working on authorization, as
your question indicates.

Read and understand this page well:
http://www.pmwiki.org/wiki/PmWiki/Passwords

Then in this page http://www.pmwiki.org/wiki/PmWiki/PasswordsAdmin you need
to read carefully, particularly under the heading for
Identity-based authorization (username/password logins, AuthUser
<http://www.pmwiki.org/wiki/PmWiki/AuthUser>)
In short, you append the ?action=attr (or &action=attr if you are not using
short URLs) to the URL of the page whose authorization you are
administering.  Then fill in the relevant password field(s) with something
like @designer.  If you want to affect authorization for an entire GROUP
(as you indicated) then you will use that ?action=attr on the "magic" page
Mygroup.GroupAttributes.  (The name of the page "GroupAttributes" must be
exactly like that - if you spell it wrong or have a different upper/lower
case then it will have no effect on the group.)

Thus if you access a page using the URL
http://www.example.com/Mygroup/Mypage then you would edit PAGE attributes
(to limit access to that individual page) by changing that URL to
http://www.example.com/Mygroup/Mypage?action=attr and you would edit GROUP
attributes (to limit access to any page within that group) by changing that
URL to http://www.example.com/Mygroup/GroupAttributes?action=attr.

If you are not using short URLs then your original URL might look like
this: http://www.example.com/pmwiki/pmwiki.php?n=MyGroup.MyPage and your
URL to edit page authorizations would be
http://www.example.com/pmwiki/pmwiki.php?n=MyGroup.MyPage&action=attr and
your URL to edit group authorizations would be
http://www.example.com/pmwiki/pmwiki.php?n=MyGroup.GroupAttributes&action=attr

(This may be obvious, but every once in a while I come across someone who
doesn't understand what I mean by "edit the URL" - by that I simply mean
clicking in the address bar of your browser and changing that text that you
find there.)

Hope that helps.  If after you get this working you have some suggestions
for the documentation to make this process simpler for the next person
learning pmwiki, please consider "giving back" to the community by updating
the documentation on pmwiki.org...

-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20140731/81d63c47/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 7023 bytes
Desc: not available
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20140731/81d63c47/attachment.jpg>


More information about the pmwiki-users mailing list