[FIX] base: require wizard for passwd change
This commit is contained in:
parent
08b7e5ab63
commit
bf75f51ddb
|
@ -280,7 +280,7 @@ class res_users(osv.osv):
|
||||||
}
|
}
|
||||||
|
|
||||||
# User can write on a few of his own fields (but not his groups for example)
|
# User can write on a few of his own fields (but not his groups for example)
|
||||||
SELF_WRITEABLE_FIELDS = ['password', 'signature', 'action_id', 'company_id', 'email', 'name', 'image', 'image_medium', 'image_small', 'lang', 'tz']
|
SELF_WRITEABLE_FIELDS = ['signature', 'action_id', 'company_id', 'email', 'name', 'image', 'image_medium', 'image_small', 'lang', 'tz']
|
||||||
# User can read a few of his own fields
|
# User can read a few of his own fields
|
||||||
SELF_READABLE_FIELDS = ['signature', 'company_id', 'login', 'email', 'name', 'image', 'image_medium', 'image_small', 'lang', 'tz', 'tz_offset', 'groups_id', 'partner_id', '__last_update', 'action_id']
|
SELF_READABLE_FIELDS = ['signature', 'company_id', 'login', 'email', 'name', 'image', 'image_medium', 'image_small', 'lang', 'tz', 'tz_offset', 'groups_id', 'partner_id', '__last_update', 'action_id']
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ class res_users(osv.osv):
|
||||||
"""
|
"""
|
||||||
self.check(cr.dbname, uid, old_passwd)
|
self.check(cr.dbname, uid, old_passwd)
|
||||||
if new_passwd:
|
if new_passwd:
|
||||||
return self.write(cr, uid, uid, {'password': new_passwd})
|
return self.write(cr, SUPERUSER_ID, uid, {'password': new_passwd})
|
||||||
raise osv.except_osv(_('Warning!'), _("Setting empty passwords is not allowed for security reasons!"))
|
raise osv.except_osv(_('Warning!'), _("Setting empty passwords is not allowed for security reasons!"))
|
||||||
|
|
||||||
def preference_save(self, cr, uid, ids, context=None):
|
def preference_save(self, cr, uid, ids, context=None):
|
||||||
|
|
Loading…
Reference in New Issue