I'd like to write custom Predicates for an application using
repoze.what with TurboGears2. My predicate would perform some query on
the database and check the resulting object against predefined

The issue is that the request to the db needs to filter based on a
parameter that is posted on the controller method I protected with
At the moment the check_auth function takes only "predicate" and
"environ" and I'd like to add some *args, **kwargs to pass in the
params that would then go to the decorated controller.

This would permit my custom predicate to perfom its db query based on
the request params (as I would do in my controller's code) and thus
avoid code duplication inside each protected controller.

If you know any other pattern that would help solve my issue, please
don't hesitate to enlighten me... if you think this would be a worthy
addition, then state so and I'll go ahead and propose a patch.

Florent Aide.
Repoze-dev mailing list

Reply via email to