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.
My suggestion:
$conf['disableaction'] = 'source, recent'
Andi -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist