Yes, as I said in my previous reply, the guide here: http://wiki.pylonshq.com/display/pylonscookbook/Authorization+with+repoze.what is wrong. In pylons-app/config/middleware.py: This is according to the guide and does not work: # ... from your_application.lib.auth import add_auth # ... def make_app(global_conf, full_stack=True, **app_conf): # ... # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares) app = add_auth(app) # ...
But if the add_auth function from pylons-app.lib.auth gets imported just before it is used (and after the global conf was loaded in the make_app() function, it all works fine. On Sun, Jul 12, 2009 at 4:57 AM, Tres Seaver<tsea...@palladion.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Metin Akat wrote: >> I am following this guide >> http://wiki.pylonshq.com/display/pylonscookbook/Authorization+with+repoze.what >> As far as I can see, I am complying with it absolutely. >> Could you show me which part of the whole thing ought to be "passing >> the valid dbsession object". >> As far as I can see, I do all the Session flinging like it's said in the >> guide. >> >> On Sun, Jul 12, 2009 at 3:34 AM, Tres Seaver<tsea...@palladion.com> wrote: >> You need to be passing a valid 'dbsession' object to the constructor of >> the plugin, rather than None. > > Please keep replies on the repoze-dev list, so that others can help > figure out the problem. As far as I can see, your code *must* be > passing None as the 'dbsession' argument to the constructor of the > plugin: nothing else in the plugin code ever mutates the 'dbsession' > attribute. > > > Tres. > - -- > =================================================================== > Tres Seaver +1 540-429-0999 tsea...@palladion.com > Palladion Software "Excellence by Design" http://palladion.com > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFKWUMD+gerLs4ltQ4RArpGAKC3AhtjRs3Mvtwmney3P+AlV8aB+wCeNOao > BwnUdXl6xHKkti+oqujGGVk= > =sSPb > -----END PGP SIGNATURE----- > _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev