[Simpleweb-py-users] [simpleweb-py commit] r12 - in trunk/src/simpleweb: . admin/plugins plugins
Status: Beta
Brought to you by:
essiene
From: <cod...@go...> - 2007-02-05 14:04:17
|
Author: essiene Date: Mon Feb 5 06:03:52 2007 New Revision: 12 Modified: trunk/src/simpleweb/BUGS trunk/src/simpleweb/TODO trunk/src/simpleweb/admin/plugins/create_movable.py trunk/src/simpleweb/middleware.py trunk/src/simpleweb/plugins/auth.py Log: middleware.py/AuthMiddleware/__call__ * API BREAK!!! - Default session user created is None. This is the proper semantic, so now I can do:- <codeblock> if request.session.user: #stuff to happen when there's a user pass else: #stuff to happen when there's no user pass </codeblock> As opposed to the previous:- <codeblock> if request.session.user.username: #this is an unneccessary indirection #stuff to happen when there's a user pass else: #stuff to happen when there's no user pass </codeblock> plugins/auth.py * In require() decorator, now check also check if request.session.user is True, Before proceeding to other checks on auth priviledges admin/plugins/create_movable.py * Final fixes to make create_movable work properly. In this instance, we now copy WHOLE package trees just to make sure that incase some meta package does some meta importing meta-dynamically, we don't start looking for the meta-module it needs when we've already deployed. Also, at this point, after much testing, I realize platform-agnostic create-movable is a pipe-dream :( This is mainly because of C/C++ extentions. The extentions are not platform independent, so any code that uses them (most realworld python code), can't be platform-movable. My solution in the next minor commits, will be to avoid any modules/packages that have C/C++ extensions. Instead, listing them out on the command-prompt and asking the user to manually install those modules on the target platform. Prolly also, generate a message that when we're run, will spit out the same message. *TODOfu *BUGSfu |