diff options
| author | Xavier Morel <xmo@odoo.com> | 2015-08-18 16:05:49 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2015-08-21 12:59:06 +0200 |
| commit | 2ea5c3aeefb024b185c4fac889b8f5f0f958936a (patch) | |
| tree | 30f405e07d8115103830694d202cb7841b59b74b /addons/web_planner/models/web_planner.py | |
| parent | 3c4f88b30ab2a4f5b734a210fe9c81726b0d987a (diff) | |
[IMP] restrict modules to system_group
* listing of modules in website already bypassed session user
* altered authenticated endpoint so it does the same
* sudoed a few read accesses & name_get in groups
* other accesses are list/form views, menu only accessible to
system_user
* new-API-ified some calls & unified listing of installed modules
Diffstat (limited to 'addons/web_planner/models/web_planner.py')
| -rw-r--r-- | addons/web_planner/models/web_planner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_planner/models/web_planner.py b/addons/web_planner/models/web_planner.py index 6351f9d2ba3..2236486c0f1 100644 --- a/addons/web_planner/models/web_planner.py +++ b/addons/web_planner/models/web_planner.py @@ -62,12 +62,12 @@ class Planner(models.Model): params['model'] = 'ir.module.module' # setting the module if module_name: - module = self.env['ir.module.module'].search([('name', '=', module_name)], limit=1) + module = self.env['ir.module.module'].sudo().search([('name', '=', module_name)], limit=1) if module: params['id'] = module.id return "/web#%s" % (urlencode(params),) @api.model def is_module_installed(self, module_name=None): - count = self.env['ir.module.module'].search_count([('state', '=', 'installed'), ('name', '=', module_name)]) + count = self.env['ir.module.module'].sudo().search_count([('state', '=', 'installed'), ('name', '=', module_name)]) return bool(count) |
