[dokuwiki] Re: view page source button
- From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Tue, 23 May 2006 15:49:28 +0200
Chris Smith writes:
Should there be a simple mechanism for disabling the view source button?
This is something that has been mentioned from time to time in the past
- and again recently on plugin:sql at splitbrain.
Pages for which the viewer has readonly access will show a view source
button. In some cases that isn't desirable, in the case of the sql
plugin, it would reveal the user id and password used to access the
database.
I can think of some methods to disable it:
- config option, which would disable view source for the whole wiki.
- an additional ACL level, read with view source, that would fit between
read and edit.
- modified tpl_button('edit') and tpl_actionlink('edit') functions to
allow the view source button to be turned off from the template.
- generate an event around button creation and allow plugins to modify
buttons. I like this method the least, but after the config option
installing a preset plugin is most likely the easiest way for a wiki
admin to alter the behaviour of his/her wiki.
I thought about this my self recently but I'd like to go one step further, I
want to be able to disable any action (eg. I want to disallow viewing recent
changes)
My suggestion:
$conf['disableaction'] = 'source, recent'
However currently view source is an instance of 'edit' with missing edit
right, so there are some more changes needed. So we will need a combination
of point 1 and 3 of your suggestions.
Andi
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: view page source button
- From: Otto Vainio
- [dokuwiki] Re: view page source button
- From: Oliver Geisen
- References:
- [dokuwiki] view page source button
- From: Chris Smith
Other related posts:
- » [dokuwiki] view page source button
- » [dokuwiki] Re: view page source button
- » [dokuwiki] Re: view page source button
- » [dokuwiki] Re: view page source button
Should there be a simple mechanism for disabling the view source button?
This is something that has been mentioned from time to time in the past - and again recently on plugin:sql at splitbrain.
Pages for which the viewer has readonly access will show a view source button. In some cases that isn't desirable, in the case of the sql plugin, it would reveal the user id and password used to access the database.
I can think of some methods to disable it:
- config option, which would disable view source for the whole wiki.
- an additional ACL level, read with view source, that would fit between read and edit.
- modified tpl_button('edit') and tpl_actionlink('edit') functions to allow the view source button to be turned off from the template.
- generate an event around button creation and allow plugins to modify buttons. I like this method the least, but after the config option installing a preset plugin is most likely the easiest way for a wiki admin to alter the behaviour of his/her wiki.
- [dokuwiki] Re: view page source button
- From: Otto Vainio
- [dokuwiki] Re: view page source button
- From: Oliver Geisen
- [dokuwiki] view page source button
- From: Chris Smith