app/soc/views/docs/show.py
changeset 242 17984abf0c74
parent 238 d6b533f99a45
child 270 7dd6d8347b56
equal deleted inserted replaced
241:0408b85de42b 242:17984abf0c74
    53     be filled out, or a redirect to the correct view in the interface.
    53     be filled out, or a redirect to the correct view in the interface.
    54   """
    54   """
    55   # create default template context for use with any templates
    55   # create default template context for use with any templates
    56   context = response_helpers.getUniversalContext(request)
    56   context = response_helpers.getUniversalContext(request)
    57 
    57 
       
    58   # TODO: there eventually needs to be a call to some controller logic that
       
    59   #   implements some sort of access controls, based on the currently
       
    60   #   logged-in User's Roles, etc.
       
    61 
       
    62   # TODO: based on the User's Roles, Documents that the User can edit
       
    63   #   should display a link to a document edit form
       
    64 
    58   # try to fetch User entity corresponding to linkname if one exists    
    65   # try to fetch User entity corresponding to linkname if one exists    
    59   try:
    66   try:
    60     doc = document.getDocumentIfPath(partial_path, link_name=linkname)
    67     doc = document.getDocumentIfPath(partial_path, link_name=linkname)
    61   except out_of_band.ErrorResponse, error:
    68   except out_of_band.ErrorResponse, error:
    62     # show custom 404 page when Document path doesn't exist in Datastore
    69     # show custom 404 page when Document path doesn't exist in Datastore