Fix #33 bug, thinking all users are anon

Fix bug in vagrantfile
Fix bug in db create/drop
Fix typo in cli
This commit is contained in:
Matthew Scragg 2014-11-11 11:35:09 -06:00
parent c2404760b8
commit 863de00a14
6 changed files with 15 additions and 17 deletions

View file

@ -32,7 +32,7 @@ def revert():
commit = request.form.get('commit')
message = request.form.get('message', "Reverting %s" % cname)
if not current_app.config.get('ALLOW_ANON') and current_user.is_anonymous:
if not current_app.config.get('ALLOW_ANON') and current_user.is_anonymous():
return dict(error=True, message="Anonymous posting not allowed"), 403
if cname in current_app.config.get('WIKI_LOCKED_PAGES'):
@ -107,7 +107,7 @@ def page_write(name):
if not cname:
return dict(error=True, message="Invalid name")
if not current_app.config.get('ALLOW_ANON') and current_user.is_anonymous:
if not current_app.config.get('ALLOW_ANON') and current_user.is_anonymous():
return dict(error=True, message="Anonymous posting not allowed"), 403
if request.method == 'POST':