web/application.py
branchstable
changeset 5587 72679e450f6d
parent 5584 c1823448f81d
child 5590 a56eb02f9ce7
child 5650 86e874fe30ea
--- a/web/application.py	Wed May 26 12:31:39 2010 +0200
+++ b/web/application.py	Wed May 26 12:31:40 2010 +0200
@@ -233,12 +233,15 @@
         return session
 
     def _update_last_login_time(self, req):
+        # XXX should properly detect missing permission / non writeable source
+        # and avoid "except (RepositoryError, Unauthorized)" below
+        if req.user.metainformation()['source']['adapter'] == 'ldapuser':
+            return
         try:
             req.execute('SET X last_login_time NOW WHERE X eid %(x)s',
                         {'x' : req.user.eid})
             req.cnx.commit()
         except (RepositoryError, Unauthorized):
-            # ldap user are not writeable for instance
             req.cnx.rollback()
         except:
             req.cnx.rollback()