I found the problem, I had to add

user_signature=False

to the SQLFORM.grid i.e. (SQLFORM.grid(.............,user_signature=False)

This sorted out the problem


On Sunday, 8 May 2016 17:04:52 UTC+1, DenesL wrote:
>
>
> http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#login-required-by-default-for-data-updates
> By default all the URLs generated by the grid are digitally signed and 
> verified. This means one cannot perform certain actions (create, update, 
> delete) without being logged-in.
>
>
> On Sunday, May 8, 2016 at 11:58:08 AM UTC-4, Simon Carr wrote:
>>
>> Here is the code in my controller.
>>
>> # -*- coding: utf-8 -*-
>> # try something like
>> def index():
>>     return dict(message="hello from supplier.py")
>>
>>
>> def manage_suppliers():
>>     links = [lambda row: A(SPAN(_class='glyphicon glyphicon-search'),' 
>> View',_class='button btn btn-default',_href=URL("supplier","view",args=[
>> row.id]))]
>>     form = SQLFORM.grid(db.suppliers,links=links,details=False)
>>     return locals()
>>
>>
>> def view():
>>     supplier = db.suppliers(request.args(0))
>>     form = SQLFORM.grid(db.supplier_contacts)
>>     return supplier
>>
>>
>> I can get to manage_suppliers just fine, but when I click "View" against 
>> one of the suppliers I get "Not Authorized".
>>
>> If I remove 
>> form = SQLFORM.grid(db.supplier_contacts)
>>
>> from the the view method. It works fine, so the issue seems with this 
>> line of code.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to