Sorry, all three of these messages were held for moderation and I approved all three. I have no idea why the pylons maillist holds anything for moderation, it's not configured to, but haven't had time to figure out why.
- C On Thu, 2011-08-11 at 18:09 +0700, Sergei Stolyarov wrote: > Hello. > > In the pyramid.authentication.SessionAuthenticationPolicy (or > AuthTktAuthenticationPolicy) class description there is constructor > argument ``callback``. One of ``callback`` arguments is `userid`. > > What exactly `userid` is? As I've found from the sources, it's a value > that passed to pyramid.security.remember, but in that method argument > is named "principal". > > Moreover, I can pass to pyramid.security.remember not string but > object (sqlalchemy model for example) and everything is working just > fine (stored in the session). > > So maybe developers should rename "userid" to "principal"? > > And another question. What's the recommended way to store sqlalchemy > model instance in the session that represents current user? I don't > want to query database every HTTP request to obtain "user" object by > it's uid stored as ``principal`` value. > > -- > Sergei Stolyarov > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
