Skip to content
Snippets Groups Projects
Commit e80f1152 authored by Xavier Morel's avatar Xavier Morel
Browse files

[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
parent 992220eb
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment