From 1e1d3ed9e61fd1520a8b8800084c8ba66bbacba7 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 23 Jul 2018 13:38:15 +0500 Subject: [PATCH] [FIX] base: suggested default ACL should be safer When there is no ACL for a model, the system emits a log with a sample ACL entry that developers should consider adding. This proposed ACL should be safe: a default read-only access for internal users seems appropriate. Closes #25919 --- openerp/modules/loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/modules/loading.py b/openerp/modules/loading.py index 3d235657712..23c921bf442 100644 --- a/openerp/modules/loading.py +++ b/openerp/modules/loading.py @@ -389,7 +389,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False): cr.execute("""select model,name from ir_model where id NOT IN (select distinct model_id from ir_model_access)""") for (model, name) in cr.fetchall(): if model in registry and not registry[model].is_transient() and not isinstance(registry[model], openerp.osv.orm.AbstractModel): - _logger.warning('The model %s has no access rules, consider adding one. E.g. access_%s,access_%s,model_%s,,1,0,0,0', + _logger.warning('The model %s has no access rules, consider adding one. E.g. access_%s,access_%s,model_%s,base.group_user,1,0,0,0', model, model.replace('.', '_'), model.replace('.', '_'), model.replace('.', '_')) # Temporary warning while we remove access rights on osv_memory objects, as they have