Have been reading the web2py chapters but still would like an example of 
authorizing only the creator of a record to delete or edit it.  Can someone 
please type the code needed to prevent users from editing or deleting a 
record except for the person who created it, for the example below?

def search_shared_services():
    grid = SQLFORM.smartgrid(db.SharedService, linked_tables=[
'SharedServicePartnerIntersection'],
    maxtextlength={'SharedServicePartnerIntersection.sharedServiceID':140,  
'SharedService.shortSharedServiceTitle':140,
'SharedService.shortSharedServiceDescription':140})
    return dict(grid=grid)

Can any authorization be done in the model or is it only done in the 
controller?

Thanks,

Alex Glaros

-- 

--- 
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