Hi!
On 6 Feb., 12:05, Christoph Zwerschke <[email protected]> wrote:
> Michael Brickenstein schrieb:
>
> > @Suggestion 4:
> > - it doesn't become very clear to the user by reading the code, that
> > tg.acess.has_permission('edit') is actually something different than
> > importing the permission class in the template and using
> > has_permission('edit')
>
> Can you elaborate a bit more?
>

> Or do you mean passing the has_permission predicate and forgetting to
> call the evaluate() function or the is_met() method? That's why
> overriding __nonzero__ in the predicate class with either a warning or
> an auto evaluation mechanism might still be a good idea.
>

Sorry, I confused the word "predicate" and "permission".
Yes indeed, that would still be needed.


> > - Moreover it really suggests repeat yourself. So defining the
> > permission somewhere, decorating the controller with it and importing
> > the permission itself in the template would be discouraged.
>
> Where do you see repetiton here? The problem with repetition of the
> require() decorator is addressed by #1. Using has_permission directly in
> the template is intended for use cases only where you want to hide
> certain data (not a link) with a py:if directive in the template.

I don't know, how #1 is implemented.
Does it work for arbitrary mounted WSGI-apps?
It is planned to support repoze.what predicates in RUM.

Personally, I think, it is not only about RUM, we should try to
integrate as good as possible
with mounted WSGI-apps.
By the way, I am happy, that Gustavo emphasizes so much,
on doing things cleanly, so that they are usable outside of TG.
I hope, that we will also get it useable and simple.
Michael
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to