Changeset 45:0391fe75aef3 in documentViewer


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

Files:
2 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()
  • zpt/changeDocumentViewer.zpt

    r33 r45  
    11<div tal:replace="structure here/manage_page_header">Header</div>
    2         <h2>Add a Document Viewer</h2>
     2<!-- ZOPE management tabs -->
     3<h2 tal:define="manage_tabs_message options/manage_tabs_message | nothing"
     4    tal:replace="structure here/manage_tabs">Tabs</h2>
     5<!-- end of ZOPE management tabs -->
    36                <form action="changeDocumentViewer">
    47               
Note: See TracChangeset for help on using the changeset viewer.