diff --git a/bin/addons/base/__terp__.py b/bin/addons/base/__terp__.py
index b1e4693ae81..6a3929b497c 100644
--- a/bin/addons/base/__terp__.py
+++ b/bin/addons/base/__terp__.py
@@ -35,8 +35,9 @@
"depends" : [],
"init_xml" : [
"base_data.xml",
- "base_security.xml",
"base_menu.xml",
+ "base_security.xml",
+ "res/res_security.xml",
],
"demo_xml" : [
"base_demo.xml",
diff --git a/bin/addons/base/base_security.xml b/bin/addons/base/base_security.xml
index 82ab0b89ee0..c7651e1e0ec 100644
--- a/bin/addons/base/base_security.xml
+++ b/bin/addons/base/base_security.xml
@@ -25,6 +25,8 @@
+
+
@@ -79,57 +81,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- base
-
-
-
- base
-
-
-
- base
-
-
-
- base
-
-
-
- base
-
-
-
- base
-
-
-
- base
-
-
- system
-
+
+
+
system
@@ -171,10 +127,6 @@
system
-
- system
-
-
system
diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py
index 21c81e210f1..4be97e15c56 100644
--- a/bin/addons/base/ir/ir_model.py
+++ b/bin/addons/base/ir/ir_model.py
@@ -518,6 +518,7 @@ class ir_model_config(osv.osv):
_name = 'ir.model.config'
_columns = {
'password': fields.char('Password', size=64, invisible=True),
+ 'password_check': fields.char(' confirmation', size=64, invisible=True),
}
def action_cancel(self, cr, uid, ids, context={}):
@@ -533,12 +534,15 @@ class ir_model_config(osv.osv):
res = self.read(cr,uid,ids)[0]
root = self.pool.get('res.users').browse(cr, uid, [1])[0]
self.unlink(cr, uid, [res['id']])
- self.pool.get('res.users').write(cr, uid, [root.id], {'password':res['password']})
- return {
- 'view_type': 'form',
- "view_mode": 'form',
- 'res_model': 'ir.module.module.configuration.wizard',
- 'type': 'ir.actions.act_window',
- 'target':'new',
- }
+ if res['password']==res['password_check']:
+ self.pool.get('res.users').write(cr, uid, [root.id], {'password':res['password']})
+ return {
+ 'view_type': 'form',
+ "view_mode": 'form',
+ 'res_model': 'ir.module.module.configuration.wizard',
+ 'type': 'ir.actions.act_window',
+ 'target':'new',
+ }
+ else:
+ raise except_orm(_('Error'), _("Password mismatch !"))
ir_model_config()
diff --git a/bin/addons/base/res/res_security.xml b/bin/addons/base/res/res_security.xml
new file mode 100644
index 00000000000..adcf182f0c6
--- /dev/null
+++ b/bin/addons/base/res/res_security.xml
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ system
+
+
+
+ system
+
+
+
+ system
+
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+ base
+
+
+
+
+
+