Hello, everybody.
There's a new release candidate for repoze.what.
Changelog
=========
* Fixed the constructor of the Not predicate, which didn't call its parent and
therefore it was not possible to specify a custom message.
* From now on, predicates that are not met will have only *one* error message,
even in compound predicates. It didn't make sense to have a list of errors
and thus this behavior has been changed in this release. This will affect
you if you deal with :func:`repoze.what.authorize.check_authorization`
directly and handled the errors of
:class:`repoze.what.authorize.NotAuthorizedError` as in::
try:
check_authorization(predicate, environ)
except NotAuthorizedError, exc:
for error in exc.errors:
print error
The code above may be updated this way::
try:
check_authorization(predicate, environ)
except NotAuthorizedError, exc:
print exc
.. note::
This doesn't affect TurboGears 2 users because TG itself deals with this
function and it's already updated to work with :mod:`repoze.what` 1.0rc2.
Keep in mind that for this release to work on TurboGears 2, you need
TurboGears 2 Beta 1 (not yet released as of this writing) or the latest
revision in the repository.
* For forward compatibility, it's no longer mandatory to use the
groups/permissions-based authorization pattern in order to use
:mod:`repoze.what`. This package should support several authorization
patterns and they must all be optional, such as the upcoming support for
roles-based authorization in :mod:`repoze.what` 1.5. As a result, now you
can skip the definition of group and permission adapters and use
:func:`repoze.what.middleware.setup_auth` as a simple proxy for
:class:`repoze.who.middleware.PluggableAuthenticationMiddleware`::
app_with_auth = setup_auth(
app,
identifiers=identifiers,
challengers=challengers,
mdproviders=mdproviders,
classifier=classifier,
challenge_decider=challenge_decider
)
TG2 trunk users: To use this release candidate, you have to update your TG2
working copy, and vice versa, if you update your working copy you'll need this
repoze.what release (just run `python setup.py develop` to have it installed).
I'd also like to highly a new adapters plugins which makes repoze.what support
groups and permissions stored in XML files:
http://code.gustavonarea.net/repoze.what.plugins.xml/
So now you're able to store your groups in databases, Ini files (thanks to
José Dinuncio) and XML files. On my part, I won't work on more adapters so
that I can work on repoze.what itself, but if somebody wants to create a new
one, I'd love to see one to re-use Htgroups files.
On a side note, I'd like to let you know that I'll be on vacations from today
until Jan 11 and I may not be able to check my email very often during this
time (although I may be wrong).
Cheers!
--
Gustavo Narea <http://gustavonarea.net/>.
Get rid of unethical constraints! Get freedomware:
http://www.getgnulinux.org/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---