I am adding authentication and limitations to an app. Consider two
tables:

db_define_table('detail',
    , Field('detail_item', type='string',label=T('Item'))
    , FIeld('owner_id', db.auth_user, readable=False, writable=False)
)

I have a controller that includes a method to list all records in the
detail tale, and now I need to limit it to records owned by the logged
in user.

I've reviewed all of chapter 8, and also the source code for the Auth
class. I still don't see how to implement this.  If I could know who
is logged in, I could handle it in my select.

There's probably a web2py best practice for this, as well.

Can somebody please explain.

Thanks,
Ed Greenberg

Reply via email to