Suspend security
(0)
237

Suspend security

FREE

Available versions
Technical name
base_suspend_security
License
AGPL-3
Secure dependencies
N/A
Suspend security

Suspend security

Beta License: AGPL-3 OCA/server-backend Translate me on Weblate Try me on Runboat

This module was written to allow you to call code with some uid while being sure no security checks (ir.model.access and ir.rule) are done. In this way, it’s the same as sudo(), but the crucial difference is that the code still runs with the original user id. This can be important for inherited code that calls workflow functions, subscribes the current user to some object, etc.

Usually, you’ll be in in the situation to want something like this if you inherit from a module you can’t or don’t want to change, and call super().

Table of contents

Installation

This version is only valid for being used since Odoo commit dcc752aaabc10aee8bbccc1474b43d224b57023c (merged on 2019-02-20).

Usage

To use this module, you need to:

  • depend on this module
  • call yourmodel.suspend_security().function_to_run(), just the same as you would use sudo()

For further information, please visit:

Known issues / Roadmap

  • the magic works by wrapping uid in a marker class, so if some code unwraps this in the calling tree, security checks will be reenabled

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Therp BV
  • brain-tec AG

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/server-backend project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

0.0 / 5.0
based on 0 ratings
This app does not use any external Python dependencies.
This app has automated tests.

Available languages

Language % translated
Italian / Italiano
100%
Portuguese (BR) / Português (BR)
100%
Portuguese / Português
25%
Croatian / hrvatski jezik
25%
Croatian / hrvatski jezik
25%
Spanish / Español
25%
Arabic / الْعَرَبيّة
25%
Finnish / Suomi
25%
Turkish / Türkçe
25%
Spanish / Español
25%
Romanian / română
25%
Greek / Ελληνικά
25%
French (CH) / Français (CH)
25%
Turkish / Türkçe
25%
Slovenian / slovenščina
25%
German / Deutsch
25%
Dutch / Nederlands
25%
Chinese (Simplified) / 简体中文
25%
French / Français
25%
English (US)
25%
French / Français
25%
Dutch / Nederlands
25%
French (CA) / Français (CA)
0%
Portuguese / Português
0%
Spanish (MX) / Español (MX)
0%