Possibilite d'interdire l'editeur graphique
darcs-hash:20080313183217-af139-f2dfc9607d8bf2c52232bd38fb60dcbdea1cf198.gz
This commit is contained in:
parent
f1eca7dc21
commit
028712dc99
1 changed files with 10 additions and 1 deletions
|
@ -9,7 +9,9 @@
|
|||
from MoinMoin import PageEditor
|
||||
import os, time, codecs, re
|
||||
|
||||
from MoinMoin import caching, config, user, util, wikiutil, error
|
||||
#### HACK SAUVAGE 1/2
|
||||
from MoinMoin import caching, config, user, util, wikiutil, error, search
|
||||
#### FIN DU HACK 1/2
|
||||
from MoinMoin.Page import Page
|
||||
from MoinMoin.widget import html
|
||||
from MoinMoin.widget.dialog import Status
|
||||
|
@ -84,6 +86,13 @@ class PageGraphicalEditor(PageEditor.PageEditor):
|
|||
else:
|
||||
msg = edit_lock_message
|
||||
|
||||
#### HACK SAUVAGE 2/2
|
||||
query = search.QueryParser().parse_query(u'CatégorieEditeurGraphiqueInterdit')
|
||||
page = search.Page(request, self.page_name)
|
||||
if query.search(page):
|
||||
msg = _('You cannot use the graphical editor on this page.')
|
||||
#### FIN HACK 2/2
|
||||
|
||||
# Did one of the prechecks fail?
|
||||
if msg:
|
||||
self.send_page(self.request, msg=msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue