> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tegan Dowling > Sent: Wednesday, September 24, 2008 3:14 PM > To: [email protected] > Subject: Re: [pmwiki-users] homepage for users > > On Wed, Sep 24, 2008 at 1:16 PM, David Johnson > <[EMAIL PROTECTED]> wrote: >> Hey, everyone. >> >> I am setting up a pmwiki wiki for our business and I have LDAP >> authentication working. Different departments are going to be using >> this wiki and I'm hoping to have them all using the same site, but >> obviously with different access. I don't want the Executive group changing >> any pages >> by the IT group, for example. Anyway, I have figured out permissions at >> least on a user basis and I want to make it so certain users or groups of >> users >> get a different homepage when they enter the wiki. >> >> Is it possible for a certain user to have a homepage that is not the >> default homepage? If so, how can I make this work for a few different groups >> of users? > > Are you familiar with the syntax for conditional stuff? You might > have something on Main/HomePage that says, in essence, > > If logged in w the rights to view (or edit) Group1.TestPage1 > Then (:redirect Group1.HomePage:) > Else if logged in w the rights to view (or edit) Group2.TestPage2 > Else ... > > Might that work? You could even suppress the standard redirection > messages. OR if there's a problem w having multiple redirections on > one page, then maybe you could do something similar, but under tested > conditions, (:include Group1.HomePage:)
On Wed, Sep 24, 2008 at 2:29 PM, David Johnson <[EMAIL PROTECTED]> wrote: > That's a good idea with the conditional on the main homepage. I am not > that familiar with the syntax to do that, actually, so if anyone can > show me how to do that, I would appreciate it. Will php work somehow on > an individual page? Hmm. Does your question "Will php work somehow on an individual page?" mean that you thing I was talking about using PHP to do the conditional stuff? I wasn't -- I don't know enough PHP to figure out how to do something like that -- I meant using PmWiki's own conditional syntax. What version of PmWiki are you using? I run the v2.1.26, so don't have/know all the rules for the current version's conditionals -- I don't know the If...Else constructions as they aren't enabled in the version I run. But if it were one of mine, I'd try having Main/HomePage say the parts between /////////// lines below: ///////////////////// (:if auth read Group1.AuthPage:)(:redirect Group1.HomePage:) (:if auth read Group2.AuthPage:)(:redirect Group2.HomePage:) (:ifend:) Welcome! /////////////////// Then I'd have Group1.AuthPage read-protected for my first group of people, just as a way of establishing who they are, and have Group2.AuthPage read-protected for my second group of people. This is assuming you don't want to read-protect the entire wikigroups for groups 1 and 2, just want to steer people to the right starting places. If you're prohibiting groups 1 and 2 from reading each other's wikigroups altogether, then you don't need GroupN.AuthPage at all, just use (:if auth read Group1.HomePage:), etc. I'm sure someone else can provide something tighter and cleaner. For one thing, some of this "(:if auth read...") stuff may note necessary, either -- there may be a less round-about way to test for the user's membership in a target group. Also note that the way I have it assumes (:redirect:) statements can even *be* conditionally read -- it may be that a (:redirect... is read regardless. (If that's the case, then I'd try using (:include Group1.HomePage:) instead). AND also note that the way I have it, you will want to have some heirarchy of user-groups in mind, since someone whose login confers read-rights to both groups will get redirected to (or see the included HomePage of, depending on how redirect rules actually work) the first one, even if he/she might prefer the second. Alternative: I have some sites where the Main/HomePage has a login box on it, and then once someone has logged in, the page displays "Your password confers access to the following parts of the site:" followed by a pagelist that only displays links to HomePages of wikigroups for which the user's password provides access. Someone else should definitely chime in here, please, with suggestions and alternatives. There are almost certainly more elegant ways to do this stuff with the PmWiki markup, and maybe there actually *is* a way to do this kind of thing with PHP, for instance, which would surely be more elegant. _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
