The "authorize" argument applies to upload fields only. You can specify a 
function that takes the Row object of a given record and returns True or 
False to indicate whether the file is allowed to be retrieved (it is used 
in the Field's .retrieve() method, which is called by response.download() 
when attempting to download uploaded files). The particular function below 
simply checks that the user is logged in (i.e., authorization only depends 
on login and not anything specific to the Row itself). If authorization 
fails, and 403 response is returned.

Anthony

On Friday, March 29, 2013 9:59:01 AM UTC-4, [email protected] wrote:
>
> authorize=lambda row: auth.is_logged_in()
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to