Changeset 45:0391fe75aef3 in documentViewer for documentViewer.py


Ignore:
Timestamp:
Jul 26, 2006, 12:23:55 PM (18 years ago)
Author:
casties
Branch:
default
Message:

fixed handling of documents with missing access tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r43 r45  
    144144        access = docinfo.get('accessType', None)
    145145        zLOG.LOG("documentViewer (accessOK)", zLOG.INFO, "access type %s"%access)
    146         if access is None:
    147             # no information - no access
    148             return False
    149         elif access == 'free':
     146        if access is not None and access == 'free':
    150147            zLOG.LOG("documentViewer (accessOK)", zLOG.INFO, "access is free")
    151148            return True
    152         elif access in self.authgroups:
     149        elif access is None or access in self.authgroups:
    153150            # only local access -- only logged in users
    154151            user = getSecurityManager().getUser()
Note: See TracChangeset for help on using the changeset viewer.