Re: PagePrivacy & admin view woes
[email protected] (Dave Howorth) Mon, 30 Jan 2006 11:12:43 +0000
| Newsgroups | perl.kwiki |
|---|---|
| Organization | MRC Centre for Protein Engineering |
| Message-ID | <[email protected]> |
Dave Holland wrote: > On Wed, Jan 25, 2006 at 06:07:18PM +0000, Dave Howorth wrote: >>I'm still stumped on this. I've looked at Kwiki::PagePrivacy.pm and >>don't understand how it works. I put prints into every sub and see them >>being called when I'm in the admin view, but never from the normal view. >>Is there anything that would help me understand how this module works? >>How does it stop people viewing private pages? > > Hi, Hello Dave, Thanks very much for this - it works now :) > I think I have this working; my setup is as follows: > > * "root" wiki view lives in .../wiki (this has no "edit page" or "new" > functionality and private pages should not be accessible) My root does have edit capability but it doesn't seem to matter (as one would hope :) > * the admin view lives in .../wiki/admin (editing functions are > available here, as are the controls for setting pages' privacy level) Yes, mine is in the same place. > .../wiki/plugins contains, amongst other entries: > Kwiki::PagePrivacy OK this is the only place where I was different, because that file says: # WARNING: THIS FOLOWING SECTION OF PLUGINS SHOULD NOT BE MADE AVAILABLE # TO A PUBLICLY ACCESSABLE SITE! They offer capabilities which only the # site administrator should have access to. Install these plugins in a # password protected view of your kwiki. See # http://www.kwiki.org/AdminView for more information. So I had commented out PagePrivacy. I've now added it back again. Everything else is the same as your configuration (ignoring default editing capabilities) > .../wiki/config.yaml contains nothing related to PagePrivacy.pm. > > .../wiki/admin/plugins contains, amongst other entries: > Kwiki::PagePrivacy > Kwiki::Edit > Kwiki::NewPage (etc) > .../wiki/admin/config.yaml is a symlink to ../config.yaml > .../wiki/admin/config2.yaml contains: > privacy_group: admin > > The admin directory is protected by a .htaccess file. > > This appears to do what I want. How does it compare to your setup? So there was just the one change I had to make to get it working. I'll add a warning/explanation on the AdminView & PagePrivacy pages of the wiki. > When testing this, I had some trouble with my browser caching old pages; > it's worth doing shift-control-reload (or whatever) after you've made a > change to be sure you're seeing the latest view of the wiki. Also don't > forget to run "kwiki -update" when you've made changes. > Good luck, > Dave Thanks again, Dave