[dokuwiki] Re: Restrict use of <html> to a group

  • From: Chris Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 24 Oct 2005 21:13:52 +0100

Jens Pranaitis wrote:

...to restrict the use of html in dokuwiki to a group of users.
Has anyone tried this or wrote a plugin for it?
Hi,

I don't think you could do this with a plugin - at least not with one of the two types of plugins currently available. The problem with html in a page is not display (which you can do for any user) but in editing. Plugins aren't involved in editing or in saving of edited data. Also the permissions system doesn't know the contents of the file.

Possibly you could restrict pages that are allowed html to certain namespaces and configure ACL to only allow edit access to those pages to a restricted group of users. Then you would need an html replacement plugin which would be able to determine if the page came from a namespace for which html was ok or not. If you used the include plugin you would be able to safely include the contents of those pages in other pages from other namespaces. You may need changes to default include styles to ensure the included page fits seemlessly into your page. There may need to be some other logic somewhere depending on how you feel about public read access to the html "snippet" pages.

If you restrict the html snippets to one namespace it shouldn't be a difficult plugin to write .... probably only a handful of code lines over the skeleton syntax plugin.

Cheers,

Chris


-- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: