You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2020/09/07 20:04:36 UTC
[incubator-ponymail-foal] 08/10: credentials may be None,
so this is a better (working) check.
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit a85a6c178408a703fd0e47617a0021afce73237f
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Sep 7 22:03:19 2020 +0200
credentials may be None, so this is a better (working) check.
---
server/plugins/aaa.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/plugins/aaa.py b/server/plugins/aaa.py
index 5f23578..c654a4c 100644
--- a/server/plugins/aaa.py
+++ b/server/plugins/aaa.py
@@ -40,7 +40,7 @@ def can_access_email(session: plugins.session.SessionObject, email) -> bool:
def can_access_list(session: plugins.session.SessionObject, listid) -> bool:
"""Determine if a list can be accessed by the current user"""
# If logged in via a known oauth, we assume access for now...TO BE CHANGED
- if session and session.credentials.authoritative:
+ if session.credentials and session.credentials.authoritative:
return True
else:
return False