-
- Downloads
[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
Showing
- addons/account/models/chart_template.py 1 addition, 1 deletionaddons/account/models/chart_template.py
- addons/base_import_module/controllers/main.py 1 addition, 1 deletionaddons/base_import_module/controllers/main.py
- addons/google_calendar/google_calendar.py 1 addition, 1 deletionaddons/google_calendar/google_calendar.py
- addons/google_drive/google_drive.py 1 addition, 2 deletionsaddons/google_drive/google_drive.py
- addons/sale_stock/res_config.py 1 addition, 1 deletionaddons/sale_stock/res_config.py
- openerp/addons/base/ir/ir_attachment.py 1 addition, 1 deletionopenerp/addons/base/ir/ir_attachment.py
- openerp/addons/base/res/res_config.py 2 additions, 2 deletionsopenerp/addons/base/res/res_config.py
- openerp/addons/base/res/res_users.py 5 additions, 1 deletionopenerp/addons/base/res/res_users.py
Loading
Please register or sign in to comment