[pmwiki-users] View wiki based on username/group?
Patrick R. Michaud
pmichaud at pobox.com
Fri Jun 23 17:16:48 CDT 2006
On Fri, Jun 23, 2006 at 05:12:18PM -0400, Jason Frisvold wrote:
> Hi there,
> I have a wiki set up for one of the departments here at work. I'm
> working on expanding this for other departments. I'd like to have a
> single location for each user to login (I'm using AuthUser for
> authentication) and have the wiki bump them to a specific group based
> on the group they belong to. Is this possible?
Yes, it's possible. Is the group name the same as the userid, or
do you intend to keep a list of userid -> group mappings?
The essential idea is to have people login by going to a designated
page (I'll use "Site.Login" for this example), and have a per-page
configuration file for that page hand authentication and redirection.
For example, create local/Site.Login.php that contains the
## force ?action=login if not logged in
if (!@$AuthId) $action='login';
## determine where each userid should jump
$JumpTo = array(
'alice' => 'GroupA.HomePage',
'bob' => 'GroupA.HomePage',
'carol' => 'GroupB.HomePage',
'dave' => 'GroupA.HomePage',
'emily' => 'GroupB.HomePage');
## perform jump
if (@$JumpTo[$AuthId]) Redirect($JumpTo[$AuthId]);
More information about the pmwiki-users