Hi All,
I am writing a SQLFORM.grid, but I want user to be able to only read,
delete and edit their own records.
I am wanting to write a query, but how do I reference the logged in user's
username from .db.auth_user?
query:
query=((db.battle_log.created_by = “logged in user”))
Thanks
--
Thanks guys,
Both worked!
--
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
method was by far easier, how could I implement this in the
first example?
Thanks
Warrick
--
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
Prior to updating to 2.8.2 I could user the following code to hide the
fields:
db.auth_user.first_name.readable = db.auth_user.first_name.writable = False
db.auth_user.last_name.readable = db.auth_user.last_name.writable = False
However, now I receive an error:
type 'exceptions.AttributeError'
4 matches
Mail list logo