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:
parent
c2404760b8
commit
863de00a14
6 changed files with 15 additions and 17 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue