Freshly cloned web2py, grid example says "not authorized"

38 views
Skip to first unread message

BigBaaadBob

unread,
Sep 22, 2020, 12:45:24 PM9/22/20
to web2py-users
I just now cloned (recursive) the web2py distro, started it, and clicked on the "grid example" button in the welcome application. I then registered when asked to authenticate. I got redirected back to the welcome app index page. I then click on the "grid example" button again and I get "Not authorized, insufficient privileges".

Should this work out-of-the-box?

Константин Комков

unread,
Sep 22, 2020, 2:04:00 PM9/22/20
to web...@googlegroups.com
Hello! You need to comment decorator #@auth.requires_membership('admin') or add your user in 'admin' group see chapter 9 Access Control in The book.
Also set table name, forexample:
tablename = 'auth_user'



BigBaaadBob

unread,
Sep 22, 2020, 11:18:05 PM9/22/20
to web2py-users
Yes, thanks. I’m just surprised this doesn’t work In the Welcome application out of the box. I’m not writing a new application; I’m just clicking on the buttons provided in unchanged freshly cloned code.

AGRogers

unread,
Sep 22, 2020, 11:36:41 PM9/22/20
to web...@googlegroups.com
Yes, I got bitten by this too. My opinion is that this decorator (and others like it) should start commented out. These little obstacles can make those first weeks unnecessarily harder. 

--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/e9a55652-c0f7-40f9-8e60-6d8c6fed033dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages