diff options
| author | Xavier Morel <xmo@odoo.com> | 2015-08-19 15:35:11 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2015-08-20 09:42:06 +0200 |
| commit | e80f1152c79fd8d203c4bb591c8deefa08337368 (patch) | |
| tree | ce08b7e8f39c4ac669a9d72294702916e3912747 /addons/analytic_user_function | |
| parent | 992220eb4c475542d6513431f6f3a1732c872155 (diff) | |
[ADD] convenience res_users._is_admin
Checks that the provided user (or user in the provided dataset):
* is the superadmin
* or is a member of group_erp_manager
There are a number of hand-rolled "is_admin" checks in the codebase some
of which are fairly gnarly. The shortcut provides a single point of
contact, avoids forgetting about cases (e.g. SUPERUSER_ID) and is
relatively convenient when checking a user which is not the "current"
user.
closes #8146
Diffstat (limited to 'addons/analytic_user_function')
0 files changed, 0 insertions, 0 deletions
