summaryrefslogtreecommitdiff
path: root/bin/service/security.py
diff options
context:
space:
mode:
authorapa-tiny <patelamit2003@gmail.com>2008-12-11 19:00:48 +0530
committerapa-tiny <patelamit2003@gmail.com>2008-12-11 19:00:48 +0530
commitcfc14c69aebfa5ae8cb0536712c4cf9168e43fe9 (patch)
tree1e66ad376c5f20861a90bebde02190e34e0732b0 /bin/service/security.py
parentd1ab49e090f8d7c6f09dac8199607e759660e050 (diff)
add logout method for ajm
bzr revid: patelamit2003@gmail.com-20081211133048-x1me7ic1dft9qgs8
Diffstat (limited to 'bin/service/security.py')
-rw-r--r--bin/service/security.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/service/security.py b/bin/service/security.py
index 81c6ef99744..4b6d5055bc1 100644
--- a/bin/service/security.py
+++ b/bin/service/security.py
@@ -35,6 +35,16 @@ def login(db, login, password):
else:
return False
+def logout(db, login, password):
+ cr = pooler.get_db(db).cursor()
+ cr.execute('select login from res_users where id=%d'%(login))
+ res = cr.fetchone()
+ cr.close()
+ if res:
+ return res[0]
+ else:
+ return False
+
def check_super(passwd):
if passwd == tools.config['admin_passwd']:
return True