Browsing the menu data as super-user is not correct
because when we load the children menu the ORM
recursively calls menu.search(), this time as
admin, hence the groups of the admin are applied
or submenus, instead of the groups of the user.
The patch was also un-necessary, so there is no
reason to keep it.
r.4617 = chs@openerp.com-
20121129172145-0ionmbffc72hwxoa
bzr revid: odo@openerp.com-
20121212210027-i5yn1uyzmfho0jh0
modelaccess = self.pool.get('ir.model.access')
user_groups = set(self.pool.get('res.users').read(cr, SUPERUSER_ID, uid, ['groups_id'])['groups_id'])
result = []
- for menu in self.browse(cr, SUPERUSER_ID, ids, context=context):
+ for menu in self.browse(cr, uid, ids, context=context):
# this key works because user access rights are all based on user's groups (cfr ir_model_access.check)
key = (cr.dbname, menu.id, tuple(user_groups))
if key in self._cache: