Hi. Sorry to jump in late but I wanted to comment on the identity stuff. On Fri, May 29, 2009 at 1:18 AM, Uwe C. Schroeder<[email protected]> wrote: > > After you tackled the whole SA thing, you find out that the whole > auth/identity is nowhere near being as convenient or compatible as it was in > TG1. Now you have to fiddle with HTTP request headers you pull out of a > request object which may or may not be defined. Anyone who wrote an app that > relies on authentication is pretty much screwed right there.
> Registration is > non-existant. Do you really expect anyone to push up a website where nobody > can sign up? eh? this wasn't in TG1 either. They where like 2-3 third-party component but nothing official. There is work by one of our GSOC students in tgext.registration I'm sure you will find it far better than any of the previous attempts. > I don't see a reason to use a framework like TG for static pages > which don't require auth. Any simple PHP code can do that. The beauty of TG1 > was that every page could be adapted to the view of the currently > authenticated user. > This is not true the stuff is there. > Auth used to be a simple > > from turbogears import identity > > if identity.current.anonymous: > do something > else: > uid=identity.current.user.user_id > whatever you do with uid > > Now identitiy isn't even defined if the request is anonymous.Also grabbing the > uid is something like requesting the uid from a dict which may or may not be > defined or may / may not contain a repoze.something object. I hate to totally agree there. Right now the new system is functional but lacks a decent API. It's far better than the TG1 counterpart in design as we have both plugabble authentication and authorization. But it lacks on the "querying for info" and elegance of the original API. I suggest you browse my posts on this from the turbogears-trunk list and if you are willing to (I am when I get some time) work on getting an identity like API for TG 2.1 > My current app has over 2000 references to identity. All of which need to be > rewritten with multiple lines of code. Big bummer right there. What was wrong > with the old identity object that it's worth to dump it in favor of something > more complicated which actually accomplishes less than what the old identity > did? > Can't there be an API consistent wrapper of some kind? > There was nothing wrong, simply the new stuff is build on totally different concepts and most of the work wss done by someone that had no TG1 experience so he wrote the API differently. That said you can simply emulate the API now In fact I think I could come up with a quick tgext.identity that will plug the right variables in the the right place to make it work in TG2.0 > Compatibility is a big issue with TG2. IMHO it's probably not worth to do a > migration. One might just chose to rewrite the app using some other framework > that shows more consistency. > I have to disagree here a little. You are making two points a) that SA is totally different This one as you said is a lot the Fault of 0.4->0.5 but there is also a big part on us using a "SQLObject-like" layer to make it more natural in the migration. So currently TG2 is exposing a "native SA interface" instead of a ext. Second your model.__init__.py is full of comments on how to make it behave in the "old way" b) that identity is totally different. I think I pointed out this above but the most important is that it's not unfixable all the components are there they are simply in a different order. Also please remember that auth & auth was the last thing to be added to TG2 and therefore is the most inmature component of them all. repoze.what had to be build from the ground up. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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?hl=en -~----------~----~----~----~------~----~------~--~---

