Pickable -> Pickeable, thanks Anthony
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 1.99.4 (2011-12-17 10:10:41) stable
|
Version 1.99.4 (2011-12-17 11:15:12) stable
|
||||||
|
|||||||
+1
-1
@@ -157,7 +157,7 @@ class Storage(dict):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
PICKABLE = (str,int,long,float,bool,list,dict,tuple,set)
|
PICKABLE = (str,int,long,float,bool,list,dict,tuple,set)
|
||||||
def PickableStorage(data):
|
def PickeableStorage(data):
|
||||||
return Storage(dict((k,v) for (k,v) in data.items() if isinstance(v,PICKABLE)))
|
return Storage(dict((k,v) for (k,v) in data.items() if isinstance(v,PICKABLE)))
|
||||||
|
|
||||||
class StorageList(Storage):
|
class StorageList(Storage):
|
||||||
|
|||||||
+3
-3
@@ -24,7 +24,7 @@ import cStringIO
|
|||||||
from email import MIMEBase, MIMEMultipart, MIMEText, Encoders, Header, message_from_string
|
from email import MIMEBase, MIMEMultipart, MIMEText, Encoders, Header, message_from_string
|
||||||
|
|
||||||
from contenttype import contenttype
|
from contenttype import contenttype
|
||||||
from storage import Storage, PickableStorage, StorageList, Settings, Messages
|
from storage import Storage, PickeableStorage, StorageList, Settings, Messages
|
||||||
from utils import web2py_uuid
|
from utils import web2py_uuid
|
||||||
from fileutils import read_file
|
from fileutils import read_file
|
||||||
from gluon import *
|
from gluon import *
|
||||||
@@ -1494,7 +1494,7 @@ class Auth(object):
|
|||||||
if user:
|
if user:
|
||||||
password = table_user[passfield].validate(password)[0]
|
password = table_user[passfield].validate(password)[0]
|
||||||
if not user.registration_key and user[passfield] == password:
|
if not user.registration_key and user[passfield] == password:
|
||||||
user = PickableStorage(user)
|
user = PickeableStorage(user)
|
||||||
session.auth = Storage(user=user, last_visit=request.now,
|
session.auth = Storage(user=user, last_visit=request.now,
|
||||||
expiration=self.settings.expiration,
|
expiration=self.settings.expiration,
|
||||||
hmac_key = web2py_uuid())
|
hmac_key = web2py_uuid())
|
||||||
@@ -1771,7 +1771,7 @@ class Auth(object):
|
|||||||
|
|
||||||
# process authenticated users
|
# process authenticated users
|
||||||
if user:
|
if user:
|
||||||
user = PickableStorage(user)
|
user = PickeableStorage(user)
|
||||||
|
|
||||||
# process authenticated users
|
# process authenticated users
|
||||||
# user wants to be logged in for longer
|
# user wants to be logged in for longer
|
||||||
|
|||||||
Reference in New Issue
Block a user