summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2016-01-12 14:40:33 +0100
committerChristophe Simonis <chs@odoo.com>2016-02-02 18:28:23 +0100
commitccb0f6db61c9b435856dab01cde5cc366f183dde (patch)
treef91242aeec2fe546540dcbb7a64f3c8edcc5d0b4 /addons/mail/static/src/xml
parent3ac46ee3d4b9775c5d18acc8ffb95188508a20af (diff)
[FIX] base: has_group behaviour under the new API
While the signature makes sense in an old API context (sort-of) it's very easy to misuse in a new API context as one'd expect `has_group` to use the subject (recordset), not the user in the environment, compounded by ``env.user`` being browsed as administrator, resulting in the "obvious" ``env.user.has_group(foo)`` checking if the administrator (rather than the current user) has the specified group. Adds a divergent v8 version of has_group which first checks if it's called on a non-empty recordset, and in that case use the recordset id, otherwise fallback on the context user (to handle new API conversions which used the "correct" call convention rather than the obvious one). fixes #9649
Diffstat (limited to 'addons/mail/static/src/xml')
0 files changed, 0 insertions, 0 deletions