diff --git a/server_environment/__openerp__.py b/server_environment/__openerp__.py index f4bd078e7..3bdb61107 100644 --- a/server_environment/__openerp__.py +++ b/server_environment/__openerp__.py @@ -29,6 +29,7 @@ "license": "GPL-3 or any later version", "category": "Tools", "data": [ + 'security/res_groups.xml', 'serv_config.xml', ], 'installable': True, diff --git a/server_environment/security/res_groups.xml b/server_environment/security/res_groups.xml new file mode 100644 index 000000000..1297fbf26 --- /dev/null +++ b/server_environment/security/res_groups.xml @@ -0,0 +1,10 @@ + + + + + + View Server Environment Configuration + + + + diff --git a/server_environment/serv_config.py b/server_environment/serv_config.py index 7f67d44c3..5f52d37c2 100644 --- a/server_environment/serv_config.py +++ b/server_environment/serv_config.py @@ -248,6 +248,11 @@ class ServerConfiguration(models.TransientModel): def default_get(self, cr, uid, fields_list, context=None): res = {} + current_user = self.pool['res.users'].browse( + cr, uid, uid, context=context) + if not current_user.has_group( + 'server_environment.has_server_configuration_access'): + return res for key in self._conf_defaults: if 'passw' in key and not self.show_passwords: res[key] = '**********'