# HG changeset patch # User casties # Date 1153916635 -7200 # Node ID 0391fe75aef3526894c9ad3ea709f89126cf03f4 # Parent 4b519fc6a5a014f71aff7dc3c825cc6eb1016b93 fixed handling of documents with missing access tag diff -r 4b519fc6a5a0 -r 0391fe75aef3 documentViewer.py --- 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: diff -r 4b519fc6a5a0 -r 0391fe75aef3 zpt/changeDocumentViewer.zpt --- a/zpt/changeDocumentViewer.zpt Tue Jul 18 19:04:23 2006 +0200 +++ b/zpt/changeDocumentViewer.zpt Wed Jul 26 14:23:55 2006 +0200 @@ -1,5 +1,8 @@