Skip to main content
License: AGPL-3

Suspend security

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().

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 smashing it by providing a detailed and welcomed feedback.

Credits

Contributors

Maintainer

Odoo Community Association

This module is maintained by the OCA.

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.

To contribute to this module, please visit http://odoo-community.org.

Release files for odoo11-addon-base-suspend-security 11.0.1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo11-addon-base-suspend-security 11.0.1.0.1
File Interpreter ABI Platform
odoo11_addon_base_suspend_security-11.0.1.0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / odoo11_addon_base_suspend_security-11.0.1.0.1-py2.py3-none-any.whl

Download URL odoo11_addon_base_suspend_security-11.0.1.0.1-py2.py3-none-any.whl
Size 43.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f6689d6f88a4110946ccc076d535be20e45cf42ecc41d0ff100fc01083e7ed42
BLAKE2b-256 checksum
How to use checksums
3bc73584e8a7c1d04d57b40fb8361d82575faf691f096b3707eb919b6abaf76a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/30.4.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page