Re: [web2py] Re: How to set permissions for db table loaded from flat file

2013-07-03 Thread Jordan Ladora
Hi Alan, Thanks for the help! For some reason, I did not have 'auth.define_tables()' in the model. Adding it fixed the problem. Thanks again! -jl -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop re

[web2py] Re: How to set permissions for db table loaded from flat file

2013-07-02 Thread Alan Etkin
> > I should also add that if I add this line- > > auth.add_permission(1, 'read', r.id) > Perhaps this is obvious, but, have you enabled the Auth tables (they are by default in the scaffolding app)?. In order to use rbac, you should have something like this in your model auth = Aut

[web2py] Re: How to set permissions for db table loaded from flat file

2013-07-02 Thread Jordan Ladora
I should also add that if I add this line- auth.add_permission(1, 'read', r.id) so that it reads- if db(db.man.id > 0).isempty(): for line in open('database.txt', 'rU'): fieldname1,fieldname2,id1,id2 = line.strip().split('\t') r = db.man.insert(fieldname1=