New model
bzr revid: pinky-09dd53930360b01029256d2414ac925be1beb9d4
This commit is contained in:
parent
6ef58b43f5
commit
080b08b49a
|
@ -95,8 +95,14 @@ class ir_model_access(osv.osv):
|
|||
if not cr.rowcount:
|
||||
return True
|
||||
|
||||
# if group None, ok for this user
|
||||
ids = filter(lambda x: x[1], cr.fetchall())
|
||||
for i in ids:
|
||||
if not i:
|
||||
return True
|
||||
|
||||
# compute the list of groups which have the right we are looking for
|
||||
ids = map(lambda x: str(x[0]), filter(lambda x: x[1], cr.fetchall()))
|
||||
ids = map(lambda x: str(x[0]), ids)
|
||||
if not ids:
|
||||
raise osv.except_osv('Access denied !', 'You can not %s this resource !' % mode)
|
||||
ids_str = ','.join(ids)
|
||||
|
|
Loading…
Reference in New Issue