> In my application, we are tracking the techs, but they do not have 
> permission to use the app, so they are not in the the auth table.


If that's the case, then this line doesn't make any sense:

    rows=db(db.work_order.tech==auth.user.id).select() 

That selects the work orders whose "tech" is the current logged in user. 
Since db.work_order.tech is not actually referencing db.auth_user.id, the 
above will end up giving you records you did not really request (i.e., it 
will give you work orders of the tech who just happens to have the same 
record ID in the db.tech table as the current logged in user has in the 
db.auth_user table). For example, if you are logged in and have ID=5 in the 
db.auth_user table, the above will give you the work orders of the tech who 
happens to have ID=5 in the db.tech table (of course, there's no guarantee 
that such an ID even exists in that table, so this could return nothing).

Anthony

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to