Mercurial > hg > documentViewer
diff documentViewer.py @ 45:0391fe75aef3
fixed handling of documents with missing access tag
author | casties |
---|---|
date | Wed, 26 Jul 2006 14:23:55 +0200 |
parents | f3bc59cf64d9 |
children | 31059e3d9338 |
line wrap: on
line diff
--- a/documentViewer.py Tue Jul 18 19:04:23 2006 +0200 +++ b/documentViewer.py Wed Jul 26 14:23:55 2006 +0200 @@ -143,13 +143,10 @@ """returns if access to the resource is granted""" access = docinfo.get('accessType', None) zLOG.LOG("documentViewer (accessOK)", zLOG.INFO, "access type %s"%access) - if access is None: - # no information - no access - return False - elif access == 'free': + if access is not None and access == 'free': zLOG.LOG("documentViewer (accessOK)", zLOG.INFO, "access is free") return True - elif access in self.authgroups: + elif access is None or access in self.authgroups: # only local access -- only logged in users user = getSecurityManager().getUser() if user is not None: