Add ir.model.access check get and set of ir.property

This commit is contained in:
Cédric Krier
2009-09-01 18:26:12 +02:00
parent 5fd990c34a
commit 12360f178a
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add ir.model.access check get and set of ir.property
* Add ModelSingleton
* Move login test in res.user
* Rename osv into model on workflow
+6
View File
@@ -32,8 +32,11 @@ class Property(ModelSQL, ModelView):
:return: a dictionary
"""
model_field_obj = self.pool.get('ir.model.field')
model_access_obj = self.pool.get('ir.model.access')
res = {}
model_access_obj.check(cursor, user, model, 'read', context=context)
names_list = True
if not isinstance(names, list):
names_list = False
@@ -157,6 +160,9 @@ class Property(ModelSQL, ModelView):
:return: the id of the record created
"""
model_field_obj = self.pool.get('ir.model.field')
model_access_obj = self.pool.get('ir.model.access')
model_access_obj.check(cursor, user, model, 'write', context=context)
if context is None:
context = {}