Ignore:
Timestamp:
28/09/10 08:50:03 (10 years ago)
Author:
astephen
Message:

added authorised roles to check user can access this resource.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/cows_wps/renderer/xml_renderer.py

    r5958 r7531  
    126126 
    127127 
    128 def wrapExecuteResponse(context, identifier, version, input_dict, job_id, is_cached=False): 
     128def wrapExecuteResponse(context, identifier, version, input_dict, job_id,  
     129                        authorisedRoles="0", is_cached=False): 
    129130    """ 
    130131    Wraps full ExecuteResponse XML around specific response. 
    131132    outputs is either a dictionary or an XML snippet. 
     133 
     134    authorisedRoles = "0" is the numeric code for no security restrictions. 
    132135    """ 
    133     #new function definition using genshi xml template rendering 
     136    # function definition using genshi xml template rendering 
    134137    t= templateLoader.load("wps_execute_response.xml") 
    135138     
     
    138141    status_url = url_for(controller='/status', requestId=job_id, qualified=True) 
    139142 
    140 #    log.debug("context.outputs = %s" % (context.outputs,)) 
    141 #    log.debug("job_details = %s" % (job_details,)) 
    142      
    143143    if 'ProcessSpecificContent' in context.outputs: 
    144144        replaceProcessSpecificContextLists(context.outputs['ProcessSpecificContent']) 
     
    153153            output_xml = Element("ComplexValue", format=out_def["mime_type"], schema=out_def["schema"]) 
    154154                 
    155             #!FIXME: change this template 
    156             output_xml.append(comp_t.generate(context=context)) 
     155            output_xml.append(comp_t.generate(context=context, authorisedRoles=authorisedRoles)) 
    157156             
    158157        else: 
Note: See TracChangeset for help on using the changeset viewer.