[dokuwiki] Re: question on meta data and feature request for enabling
- From: Jason Keltz <jas@xxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Fri, 21 Sep 2007 12:11:36 -0400
On 09/20/07 17:17, Michael Klier wrote:
salto wrote:
Michael Klier wrote Tue, 18 Sep 2007 23:09:07 +0200
<I recently made a plugin "ClosedWiki", you`ll find it at the plugins page.
It allows you enable/disable actions for non-logged in users (it doesn`t
disable the actions completely as the disable action config options does).
ATM moment in only checks wether a users is logged in or not, but if
requested, I could add another option to allow actions only for users which
are part of certain groups or even only the admin user.>
It would be great if you could add an option to allow actions only for
specified users/groups/admin!!
Thanks very much in advance!
Done, a new version is online. If you give it a try please give me some
feedback :).
I gave it a shot .. a few points:
1) There's a bug in your plugin. Right now, if I am in group admin and
some other group X, and X has not been added to the allowed_groups, then
I am denied.
The problem is that your foreach loop that compares the logged in users
groups to the allowed_groups list automatically assumes a deny if it
finds that the user is in a group that is not in the allowed_groups. I
don't think this is actually what you wanted. I would recommend an
adjustment .... Before the foreach, set a variable "denied" which
defaults to "false". If the user is found to be in a group that is in
the allowed_groups list, break out of the foreach. On the other hand, if
you find that the user is in a group that is not in the allowed_groups
list, then you set denied to true, and continue the search. Only after
the foreach loop do you then act on the status of "denied".
2) Since you never really know by default which options the user wants
to close in their wiki, and which they wish to remain open, I wonder if
the default should be to leave everything "open".. That is, by
installing the plugin, you don't inherently change the behaviour of your
Wiki. Only when you configure the plugin do you start to block access.
3) This last issue is one of aesthetics .. I'm not 100% sure how to
explain, but I'll give it a shot. When you give the "permission denied"
error in your plugin, it is printed as a "status message" using the msg
function (in my case, highlighted with an exclamation point before the
error). DokuWiki usually reports these types of errors at the top of
the window prior to the template. Of course that's template dependent I
guess. DokuWiki also has other errors like the "You don't have enough
access to edit this page" type that are simply printed inside the
context of the page, not above it, but they are never printed like the
status message -- they are just printed in the standard font... Anyway,
this isn't a big deal, but I thought that I might mention it.
One last unrelated question which might interest others on the list --
by adding the ClosedWiki plugin, my list of configuration options in the
configuration manager TOC now starts to go underneath the first
configuration manager setting (Wiki Title), so my last entry (a
template) is almost hidden... I guess it's tricky .. if you don't go
under it, you go over it, and I'm not sure that's the right decision
either!! a neat future addition to the configuration manager would be
the use of tabs for the different sections.. right now, with lots of
plugins installed, the page gets to be very very long, and very
difficult to find the options that you're looking for.
jas.
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: question on meta data and feature request for enabling
- From: Michael Klier
- References:
Other related posts:
- » [dokuwiki] Re: question on meta data and feature request for enabling
- » [dokuwiki] Re: question on meta data and feature request for enabling
- » [dokuwiki] Re: question on meta data and feature request for enabling
- » [dokuwiki] Re: question on meta data and feature request for enabling
salto wrote:
Michael Klier wrote Tue, 18 Sep 2007 23:09:07 +0200 <I recently made a plugin "ClosedWiki", you`ll find it at the plugins page. It allows you enable/disable actions for non-logged in users (it doesn`t disable the actions completely as the disable action config options does). ATM moment in only checks wether a users is logged in or not, but if requested, I could add another option to allow actions only for users which are part of certain groups or even only the admin user.> It would be great if you could add an option to allow actions only for specified users/groups/admin!! Thanks very much in advance!
Done, a new version is online. If you give it a try please give me some feedback :).
- [dokuwiki] Re: question on meta data and feature request for enabling
- From: Michael Klier