[web2py] Re: RestAPI: how to restrict query results to data belonging to logged in user?

2020-05-27 Thread Jacinto Parga
Hello, I used this workaround in a similar case: @auth.requires_login() @request.restful() def myapi(): def GET(): response.view = 'generic.json' myreg = db(db.mytable.created_by==auth.user.id).select() # Maybe in your case mytable.user_id==auth.user.id if myreg:

Re: [web2py] Re: RestAPI: how to restrict query results to data belonging to logged in user?

2020-05-27 Thread Kevin Keller
The "proper" way would be to define "scopes" in your application. Scopes define who has access to which data. You can also call it roles or tags or whatever. Scopes is the term that is used by OAuth/OpenID connect, which is usually used to secure APIs. Normally you would get an OpenID (OIDC) ID

Re: [web2py] Re: Problem sending mails in web2py: Mail.send failure:[SSL: WRONG_VERSION_NUMBER]

2020-05-27 Thread VJ Sosa
Dear Dave, Thanks for your reply. I could fix my issue modifying the smtp server port to 465. Since the problem was related to the use of SSL, Google prefers the use of 465 port for SSL. [smtp] server = smtp.gmail.com: 465 sender = myu...@gmail.com login =

[web2py] Add to home screen

2020-05-27 Thread mostwanted
Whats the simplest way to get my web2py application to prompt users to add to screen? I have tried alot of things but none are working, there are no prompts happening! Some say its only achievable through a PWA design, i tried this