Also see AuthTable, except I see it's been superceded by AuthList. AuthList has most of the benefits of editing config.php, without the risks.

From a quick look at AuthList, run on my own site (since pmwiki.org doesn't use user IDs.

It's part of the core. The SiteAdmin/Authlist page is automatically generated. It only shows the GroupAttributes for some groups, probably the ones I set group attributes for.

Each page has links to the page and appropriate attr page.

Things I'd like to see in the core version (some of which look like are being tested on pmwiki.org):

- Table rather than list. Less scrolling.
- Include link to GroupAttributes pages even if they don't exist. Makes all groups consistent and we can click on the link rather than type in the URL.



Sandy





On 5/2/2011 12:53 PM, Peter Bowers wrote:
On Sun, May 1, 2011 at 11:08 PM, James M<jamesm1...@gmail.com>  wrote:
...
I defined in SiteAdmin/AuthUser some groups
@editors - people who can edit all groups
@friends - people who can edit a certain group
@foe - people who can edit a second group
(in fact there are 6 groups, each with its own group of editors)

Just for another perspective I find that in situations like this I
tend to be "FTP-administrator-oriented" and make changes like this in
my config.php rather than doing them in the
GroupAttributes?action=attr section.  I just find it hard to remember
when I've got a complicated setup with config spread across multiple
locations and it's easier for me when it's all in one place.  So I end
up with something like this:

## Get the group and page name
$pagename = ResolvePageName($pagename);
#$page = PageVar($pagename, '$FullName'); // not needed for this example
$group = PageVar($pagename, '$Group');
#$name = PageVar($pagename, '$Name'); // not needed for this example
...
$DefaultPasswords['edit'] = array('@editors'); // note the array(...)
if (inlist($group, array('GroupA', 'GroupB', 'GroupC')))
    $DefaultPasswords['edit'][] = '@friends';
elseif (inlist($group, array('GroupD', 'GroupE')))
    $DefaultPasswords['edit'][] = '@foes';
...

I've gotten the first 5 lines (before the ... ellipse) from
http://www.pmwiki.org/wiki/PmWiki/LocalCustomizations#configphp-group-page.
  Do note the warning there re caching problems that come if you don't
respect the appropriate order of customizations in config.php as
documented on that same page at
http://www.pmwiki.org/wiki/PmWiki/LocalCustomizations#configphp-order
(the last question on the page).

This business of putting everything in config.php is probably not the
preferred way.  Either using the ?action=attr or at least putting it
in GroupName.php instead of config.php seems to be "the pmwiki way".
But I always forget when I don't keep it in one central location, so I
opt for the centralized control.  YMMV.

Caveat: this is not code taken from an actual config.php, so there may
well be problems here.  I'm just showing you the general approach I
would take to a problem like this.

-Peter



_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to