From 4ff0e7629c6fc3fa002ad7ae493fc76f8f31f838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 6 Jun 2008 13:13:27 +0200 Subject: [PATCH] Disable reading password user --- trytond/res/user.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/trytond/res/user.py b/trytond/res/user.py index 775987d6a2..d8979a7ac2 100644 --- a/trytond/res/user.py +++ b/trytond/res/user.py @@ -123,6 +123,19 @@ class User(OSV): '(updates, module installation, ...)') return super(User, self).unlink(cursor, user, ids, context=context) + def read(self, cursor, user, ids, fields_names=None, context=None, + load='_classic_write'): + res = super(User, self).read(cursor, user, ids, fields_names=fields_names, + context=context, load=load) + if isinstance(ids, (int, long)): + if 'password' in res: + res['password'] = 'x' * 10 + else: + for val in res: + if 'password' in val: + val['password'] = 'x' * 10 + return res + def name_search(self, cursor, user, name='', args=None, operator='ilike', context=None, limit=80): if args is None: