Add ir.model.access check get and set of ir.property
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user