I am trying to create a new wiki page programmatically with MoinMoin. But it is not allowing me to edit the page, how do I provide a user to create this page as?
[Fri Mar 11 11:44:35] [root]@[dev] /usr/local/share/moin
# python2.6
Python 2.6.5 (r265:79063, Jun 4 2010, 21:43:07)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from MoinMoin.web.contexts import ScriptContext
>>> from MoinMoin.PageEditor import PageEditor
>>> request = ScriptContext('http://wiki.dev.itaas.com')
>>> pe = PageEditor(request, 'MyNewTestPage')
>>> pe.saveText('Hello World!', 0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/MoinMoin/PageEditor.py", line 1068, in saveText
raise self.AccessDenied, msg
MoinMoin.PageEditor.AccessDenied: You are not allowed to edit this page!
After setting a User
on the request
object, it creates the page, but then locks up the entire wiki instance from creating or editing and saving any new pages with 401 Unauthorized
errors.