[pmwiki-devel] Group management system...

The Editor editor at fast.st
Wed May 9 08:11:44 CDT 2007

My new group management system is coming into focus as I seem to have
figured out the info I needed on my own.  Now I just have to settle on
the features. Please feel free to add to your wishlist if you have

* Easy to add one or multiple members to groups via a form
* Easy to drop individual members via a form
* Easy to list or display members of a group using {(list group fmt)} markup
(need to settle on issue of permissions--maybe a flag marking some
groups hidden, and only visible to admins, others visible to anyone)
* Easy way to check if a member (:if ingroup group member:)
* Easy to get membership check in a config page for customizations there
* Easy to set permissions for pages, etc based on group membership
(already in PmWiki)
* Easy to check if group exists (:if groupexists group:)
* Easy to set config settings based on whether page group is a member group
* Easy to integrate with Hg so can set up virtual wikis for each group

Below are the answers I found. I hope Pm or someone can verify...


On 5/4/07, The Editor <editor at fast.st> wrote:
> Pm, could you or someone explain how a recipe author can tap into
> PmWiki's group management system?
> Here are some specific questions:
> 1) When a person logs in, are all group memberships ascertained at
> that point and stored as a session variable for future reference, or
> checked each time a group membership check is raised.  I'm assuming
> the first as it seems more efficient.

It looks like the answer here is it's implemented when they login. So
if you change their group memberships after they have logged in, they
will have to logout/login to get the change.

> 2) I plan to have multiple "Group.ChessClub" pages with a simple list
> of members on each, one to a line or optionally a list of groups on a
> Site.ZAPMemberships page or something, with lines like:  ChessClub:
> Bob,Bill,Barbara. The second one seems easier in several
> regards--though I like the first.  Do you have a recommendation?

I guess I'll go with the second one void any recommendations... I can
then tap into ZAP's existing list mgmt functions.

> 3) Could a recipe simply add values (from whichever source it chooses)
> to some kind of PmWiki array so they are checked automatically when
> they login?  If so, how?  If not, can it just manually insert those
> values into the PmWiki login session variable (ie, via a custom login
> form that checks its own sources for membership lists)?

>From the looks of things if I set up my own mechanism for verifying
individuals are members of a group when they login, I just need to
assign the following variable to mimic what AuthUser does:

     $_SESSION['authid']['authlist']['@mygroup']  = true;

> It does't seem hard to do what I want. I just need a bit of guidance
> from you which approach you prefer?

I'll assume this is correct unless I hear something otherwise, and
proceed on this basis.

More information about the pmwiki-devel mailing list