[Mpuls-commits] r5131 - in base/trunk: . mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 23 22:16:58 CEST 2011
Author: bh
Date: 2011-06-23 22:16:55 +0200 (Thu, 23 Jun 2011)
New Revision: 5131
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/lib/security.py
Log:
* mpulsweb/lib/security.py (checkLogin): Do not use ensure_unicode
anymore, because we don't need it anymore. The database has been
returning unicode objects for quite a while now.
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2011-06-23 10:00:56 UTC (rev 5130)
+++ base/trunk/ChangeLog 2011-06-23 20:16:55 UTC (rev 5131)
@@ -1,3 +1,9 @@
+2011-06-23 Bernhard Herzog <bh at intevation.de>
+
+ * mpulsweb/lib/security.py (checkLogin): Do not use ensure_unicode
+ anymore, because we don't need it anymore. The database has been
+ returning unicode objects for quite a while now.
+
2011-06-22 Torsten Irländer <torsten.irlaender at intevation.de>
* mpulsweb/controllers/case_bundle.py: Issue2005: Build caselist
Modified: base/trunk/mpulsweb/lib/security.py
===================================================================
--- base/trunk/mpulsweb/lib/security.py 2011-06-23 10:00:56 UTC (rev 5130)
+++ base/trunk/mpulsweb/lib/security.py 2011-06-23 20:16:55 UTC (rev 5131)
@@ -95,13 +95,7 @@
or not check_re.match(user)):
return None
- # imported here, because mpulsweb.lib.helpers also imports
- # mpulsweb.lib.security which leads to circular imports.
- # ensure_unicode shouldn't be needed here anymore anyway when the
- # database returns Unicode objects directly.
- from mpulsweb.lib.helpers import ensure_unicode
-
- # Also imported here because mpulsweb.model.user imports
+ # Imported here because mpulsweb.model.user imports
# mpulsweb.lib.security, which leads to circular imports.
from mpulsweb.model.user import SessionUser, SessionSuperAdmin
@@ -126,11 +120,11 @@
result = cursor.fetchone()
data = {}
data['id'] = result[0]
- data['firstname'] = ensure_unicode(result[1])
- data['lastname'] = ensure_unicode(result[2])
+ data['firstname'] = result[1]
+ data['lastname'] = result[2]
data['newpass'] = result[3]
data['activated'] = result[4]
- data['role'] = ensure_unicode(result[5])
+ data['role'] = result[5]
data['gid'] = result[6]
data['last_login'] = result[7]
data['standin'] = result[8]
More information about the Mpuls-commits
mailing list