It came to my attention while working on tg.ext.silverplate that any
extension which requires identity will need access to the classes and
table names which it uses in order to handle generic permission
handling. I need this information for instance, when passing the User
class to my dbsprockets makeForm primitive to create a user
registration form (release forthcoming) In order to give access to the
extensions for this kind of access, i propose we add identity
variables to environment.py such as the following:
config['identity'] = {'user_class':User,
'group_class':Group,
'permission_class':Permission,
'users_table':'tg_user',
'groups_table':'tg_group',
'permissions_table':'tg_permission',
}
This way the user can actually change the mappings to their database
in case they call the identity tables something else, and my extension
will still continue to function (thanks to dbsprockets).
It should be noted that a cursory check for identity capabilities
should be added, but this kind of check has been disregarded in the
current state of the TG2 paster scripts, as tgrepozewho middlewhere
has been wedged into middleware.py.
Your thoughts and feedback are appreciated as we approach this
weekend's sprint.
cheers.
-chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---