On Nov 23, 8:31 am, kralin <[email protected]> wrote:
> Thanks Massimo,
> this works, but will behave erratic if multiple dbs have two table
> with the same name.
> better than nothing...
> I think I can resolve this by giving "db1.table1" and "db2.table1"
> instead of just the table name.

Yes you can do that:
Unless you use crud.settings.auth=auth (and you probably should not in
your case) there is no real convention on permission names. You set
them, You check them. You call them what you like to avoid conflicts.

> It looks like a simple string match is performed in the has_permittion
> method of auth.
> let me check...
>
> On 23 Nov, 14:41, mdipierro <[email protected]> wrote:
>
> > You just need to remove the validator:
>
> > db.auth_permission.table_name.requires = None
>
> > On Nov 23, 6:19 am, kralin <[email protected]> wrote:
>
> > > Hi,
> > > I've got a sistem with multiple db, some are SQLlite, some are
> > > postgresql and one in MSSQL.
> > > is there a way to use auth authorization within tables that do not
> > > belongs to the db where auth data is specified?
>
> > > in the auth_permission table, I'm only required to add a table name,
> > > but what if the table is in an other db?
> > > do I have to handle this by myself, or is there a way to do it with
> > > web2py auth?
>
>

Reply via email to