[web2py] Re: auth.user.id in restful api

2013-04-08 Thread Massimo Di Pierro
Does this help: patterns = [ /friends[person], /{person.name}/:field, ... (/dogs[pet],

[web2py] Re: auth.user.id in restful api

2013-04-07 Thread Philipp Müller
Hello, yes, all the methods are decorated with @requires_login(). The login itself is not the problem, that works fine. The issue is, that I want to return user-specific results in my api. Exposing one table by writing something along the lines of: @request.restful() @auth.requires_login() def

[web2py] Re: auth.user.id in restful api

2013-04-07 Thread Christian Foster Howes
Philipp, i understand you nowunfortunately i have not used db.parse_as_rest so i don't know the answer... best i have is http://web2py.com/books/default/chapter/29/10?search=restful#parse_as_rest-%28experimental%29 perhaps someone can chime in with more details. good luck! cfh On

[web2py] Re: auth.user.id in restful api

2013-04-06 Thread Christian Foster Howes
have you tried decorating your GET/PUT/POST/DELETE methods with the @requires_login()? @request.restful() def user(): @requires_login() def GET(*args, **kwargs): i'm doing something similar to that...but with a custom decorator rather than requires_login. cfh On Friday,