is_authorized returns True when no auth method is set

This commit is contained in:
Guillaume Ayoub
2012-08-08 18:44:25 +02:00
parent 45afac5353
commit b4a7ada5f2
2 changed files with 46 additions and 47 deletions

View File

@@ -38,6 +38,8 @@ def load():
def is_authenticated(user, password):
"""Check if the user is authenticated."""
if AUTH is None:
return True
return AUTH.is_authenticated(user, password) if user else False