UserGroups: Extend Auth_Group or Table Inheritance?

Visto 33 veces
Saltar al primer mensaje no leído

Anaconda

no leída,
21 ago 2011, 1:20:0321/8/11
a web2py-users
I am looking to allow users to create their own groups and have
members. Which is more effecient:

Table Inheritance:
db.define_table('user_groups', db.auth_group,
Field('name') ...........ect.......))

or
Extend auth_group:

db.define_table(
auth.settings.table_user_group,
Field('role', length=512, default='',
label=auth.messages.label_role),
Field('description', 'text',
label=auth.messages.label_description),
Field('name', length=128, default='', unique=True))

custom_auth_group = db[auth.settings.table_user_group]

# auth.define_tables()

Thanks in advance for any help!!

Massimo Di Pierro

no leída,
21 ago 2011, 4:27:1421/8/11
a web2py-users
The question is: do you use a auth_groups to manage internal working
of the app or not? For example to you have user roles like "manager"
or "admin" etc. If so you may want to expose a different mechanism to
users. If you can use auth_groups (because you are not using it
already or you you plan to add checks to avoid conflicts, by all
means, you should use that, as it will save work later.

Massimo
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos