OK, looks like this has now been fixed in trunk: http://code.google.com/p/web2py/source/detail?r=dc83425d850190b0306cf59285178f106b1ae9d3
On Sunday, September 11, 2011 2:39:17 PM UTC-4, Anthony wrote: > > I don't know when that will be fixed (up to Massimo). Quick simple > workaround -- somewhere in a model file after the last table definition (or > even in the appadmin.py controller): > > > auth.settings.table_permission.table_name.requires=IS_EMPTY_OR(IS_IN_SET(db.tables)) > > That will update the validator with the full list of all DB tables, which > should then appear in the dropdown. Actually, another option would be to set > requires=None, which will then allow you to enter any text at all in the at > field (could be a table name, or any other name). Technically, the > table_name field is supposed to allow for any objects to be named, not just > tables, so that may make the most sense (that's what Massimo was suggesting > in his comment on the Google Code issue). > > Anthony > > On Sunday, September 11, 2011 2:25:31 PM UTC-4, monotasker wrote: >> >> Thanks Anthony. I notice it's been a few months since that issue was >> posted. I realize that changes can't happen overnight, but is there >> any sense of when a fix might be released? At the moment this >> basically means the (simple and elegant) crud authorization is useless >> to me. (I've never learned how to install patches, so I can't easily >> use the patch posted on that issue). >> >> Ian >> >> On Sep 9, 11:42 pm, Anthony <aba...@gmail.com> wrote: >> > Yes, that issue has been >> > reported:http://code.google.com/p/web2py/issues/detail?id=349 >> > >> > Anthony >> > >> > >> > >> > >> > >> > >> > >> > On Friday, September 9, 2011 11:13:04 PM UTC-4, monotasker wrote: >> > >> > > One other thing: When I try to create a new permission (on >> > > db.auth_permissions) the selectbox for the "Table name" field isn't >> > > showing any of my custom tables. It's only populated with the built in >> >> > > auth tables. Is this the way it's supposed to be? I thought that I >> > > could create a permission that links a group name with any table in >> > > db. >> > >> > > Thanks again, >> > >> > > Ian >> > >> > > On Sep 9, 6:14 pm, Massimo Di Pierro <mass...@gmail.com> >> > > wrote: >> > > > Basically you default they do nothing. You can take the fields to >> mean >> > > > what you want. You can set them auth.add_persmission(...) and you >> can >> > > > check them auth.has_permission(...) or with decorator >> > > > @auth.requires_permission(...). >> > >> > > > Things change if you set >> > >> > > > crud.settings.auth = auth >> > >> > > > in this case crud will recognize permissions with names = >> > > > 'read','create','update','delete', and 'select' on the tables that >> you >> > > > have specified. The record_id is optional. If not set the permission >> >> > > > applied to the entire table. If set the permission applied to the >> > > > record only. >> > >> > > > Hope this helps. There is not much more to it really. >> > >> > > > On Sep 9, 4:31 pm, monotasker <sco...@gmail.com> wrote: >> > >> > > > > I'm climbing up the learning curve with web2py (which really isn't >> >> > > > > very steep compared to other tools I've worked with!) and have run >> >> > > > > into something that I can't figure out from the book: the >> permissions >> > > > > system. When I create a "permission" in auth_permissions (using >> > > > > appadmin) I don't understand what each of the field values does >> > > > > (table? name?). The book seems to skip over this very quickly. >> > >> > > > > (I feel compelled to add that the book is the best official >> > > > > documentation I've ever seen for an open source project, with >> nowhere >> > > > > near the lag or holes in jQuery or Drupal docs. I bought the pdf >> > > > > version because I know the time investment that represents!). >> > >> > > > > Ian > >