Gustavo Narea schrieb:
> OK, then let's make it! :)
> http://trac.turbogears.org/ticket/2172
> 
> By the way, does anybody have a better name for that function? I don't like 
> can_access() too much.

"accessible"?

> However, the evaluate() function above (which *simply* evaluates a predicate 
> and returns a boolean depending on whether it's met) doesn't exist yet:
> http://trac.turbogears.org/ticket/2173
> 
> There's a similar function defined in repoze.what itself called 
> check_authorization() [1], but it's not suitable for this situation:
>  1.- TG2 users don't need to use it -- TG2 does so for you when you use the 
> @require decorator or the "allow_only" attribute in your controller.
>  2.- It requires the environment to be passed, hence it should be proxied by 
> a 
> TG-specific function (so that you don't have to pass the environ).
>  3.- It raises an exception when the predicate is not met.
>  4.- It logs whether authorization failed/succeeded and why.
> 
> Possibly/Hopefully I'll implement the functions above this weekend. But if 
> somebody familiar with repoze.what wants to jump in, I'd appreciate it. ;-)

Thanks. I'm not familiar enough with both repoze.what and TG2/Pylons yet 
to suggest a good implementation, and I fear this may need to break 
backward compatibility a bit, so I better leave it to you ;-)

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
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