Changeset 3492 for WAeUP_SRP


Ignore:
Timestamp:
6 May 2008, 11:36:36 (17 years ago)
Author:
joachim
Message:

fix traceback for anonymous users,
do not show log-message, when student views academic session.

Location:
WAeUP_SRP/base
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r3481 r3492  
    188188            if not is_student and requested_id:
    189189                student_id  = requested_id
    190             elif not is_staff and (is_anonymous or member_id != requested_id):
     190            elif not is_allowed and (not is_staff or member_id != requested_id):
    191191                logger.info('%s tried to access %s of %s' % (member_id,context.portal_type,requested_id))
    192192            else:
  • WAeUP_SRP/base/skins/waeup_default/getDocumentInfo.py

    r3473 r3492  
    3131
    3232student_id = info['student_id']
    33 if not info['is_staff'] and student_id is None:
    34     return None
     33# if not info['is_staff'] and student_id is None:
     34#     return info
     35    #return None
    3536
    3637titles = context.getStudentObjectTitles()
  • WAeUP_SRP/base/skins/waeup_default/waeup_document_view.pt

    r3474 r3492  
    88      <span tal:content="here/illegal_view" />
    99    </span>
    10     <span tal:condition="info" tal:define="breadcrumbs context/getBreadCrumbs">
    11       <a tal:condition="not: breadcrumbs" href="" tal:attributes="href string:${here/aq_parent/absolute_url}">
    12         <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
    13         Up one level
    14       </a>
    15       <div tal:condition="breadcrumbs">
    16         <span tal:repeat="crumb breadcrumbs"><a href="crumb"
    17                                                            tal:attributes="href crumb/url"
    18                                                            tal:content="crumb/title"></a>
    19           <span tal:condition="not: repeat/crumb/end">&gt;</span>
    20         </span>
    21       </div>
    22      
    23       <h3>
    24          <span tal:condition="python:is_so and s_name">
    25            <span tal:content="s_name" />:
    26          </span>
    27          <span tal:content="info/title" />
    28       </h3>
    29      
    30       <br />
    31 
    32       <span tal:omit-tag="" 
    33             tal:content="structure python: info['doc'].render(layout_mode='view')" />
    34 
     10    <span tal:condition="not:info/is_anonymous" tal:omit-tag="">
     11      <span tal:define="breadcrumbs context/getBreadCrumbs|nothing">
     12        <a tal:condition="not: breadcrumbs" href=""
     13           tal:attributes="href string:${here/aq_parent/absolute_url}">
     14          <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
     15          Up one level
     16        </a>
     17        <div tal:condition="breadcrumbs">
     18          <span tal:repeat="crumb breadcrumbs"><a href="crumb"
     19                                                  tal:attributes="href crumb/url"
     20                                                  tal:content="crumb/title"></a>
     21            <span tal:condition="not: repeat/crumb/end">&gt;</span>
     22          </span>
     23        </div>
     24      </span>     
     25    </span>     
     26    <h3>
     27      <span tal:condition="python:is_so and s_name">
     28        <span tal:content="s_name" />:
    3529      </span>
    36     </metal:main>
    37     <metal:sub fill-slot="sub"/>
     30      <span tal:content="info/title" />
     31    </h3>
     32    <br />
     33    <span tal:omit-tag="" 
     34          tal:content="structure python: info['doc'].render(layout_mode='view')" />
     35  </metal:main>
     36  <metal:sub fill-slot="sub"/>
    3837</metal:body>
    3938
Note: See TracChangeset for help on using the changeset viewer.