UserGroupAuth
<< | Cookbook-V1 | >>
Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
Goal
Allow (wiki) group and page access control based on users and (user) groups.
Solution
I hacked together a somewhat functional system, with username, password and group info stored in config.php
.
Discussion
I added a number of fields to the list of each page's attributes. If the list is blank, access is open to all. Note: I disabled the standard password feature, but if UserAuth can do it I'm sure I could figure it out if needed. If any user or group name is listed (comma-delimited list), only those users are allowed. An improvement would be to have the user/password and group info stored in User and Group pages, and I believe that's the plan for pmWiki2. Since that release is imminent and my code probably has a fair bit of work required to make it ready for 'prime time', I won't post it at this time since I plan to hobble along with what I've got and then just migrate to v2 in the near future. However, if for some reason you can't wait or can't use v2 for a while but gotta have this feature, contact me and I'd be happy to share: [my first name] at alumni dot uwaterloo dot ca
.
See Also
UserAuth
History
2004/10/26: First prototype version operational
Comments & Bugs
As the Cookbook/UserAuth recipe has evolved significantly, I am abandoning this recipe in favour of using that. The only missing feature that I can see is the ability to group users and specify access based on those groups, but $UserInfoObj provides a nice hook for adding that functionality. I also thought it might be nicer to have the access restrictions listed on the pages or groups rather than in the htaccess file, but there's also something to be said for centralization of all that info.
Contributors
- Shi Sherebrin
Copyright
Copyright 2004, GPL by Shi Sherebrin
pmwiki-2.3.38 -- Last modified by {{shi}}