Hello,

I'm reffering to this doc:
http://what.repoze.org/docs/1.0/Manual/InnerWorkings.html#module-repoze.what.middleware
And the source code of repoze.what.middleware.AuthorizationMetadata.
Params group_adapters and permission_adapters are used, they are dictionnaries.
I'm wondering what are the guidelines for the keys, as they don't look
to be used in the code?
I'm asking this question because I've followed the doc for tuning
Turbogears quickstarted projects:
http://turbogears.org/2.1/docs/main/Auth/whoini.html, especially:

{{{
from repoze.who.plugins.sa import (
    SQLAlchemyAuthenticatorPlugin,
    SQLAlchemyUserMDPlugin,
)
from repoze.what.plugins.sql import configure_sql_adapters
from repoze.what.middleware import AuthorizationMetadata

from customwho import model
auth_plugin = SQLAlchemyAuthenticatorPlugin(model.User, model.DBSession)
md_plugin = SQLAlchemyUserMDPlugin(model.User, model.DBSession )
_source_adapters = configure_sql_adapters(
    model.User,
    model.Group,
    model.Permission,
    model.DBSession,
)
md_group_plugin = AuthorizationMetadata(
    {'sqlauth': _source_adapters['group']},
    {'sqlauth': _source_adapters['permission']},
)
}}}

I'm using a custom authenticator (ldap), so I don't need
SQLAlchemyAuthenticatorPlugin anymore. ( and the passwords are not
stored anymore in the User class).
These lines:
{{{
md_group_plugin = AuthorizationMetadata(
    {'sqlauth': _source_adapters['group']},
    {'sqlauth': _source_adapters['permission']},
)
}}}
refer to sqlauth that I'm not using (it's the name of the plugin given
in who.ini) so I don't know what to do.

What is the semantic of these keys?
Do I have to change them?

Cheers!
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to