Skip to main content

Suspend security checks for a call

Project description

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 here.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

Details for the file odoo8_addon_base_suspend_security-8.0.1.0.1-py2-none-any.whl.

File metadata

File hashes

Hashes for odoo8_addon_base_suspend_security-8.0.1.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 148ef71c20805a69e0c4e85d3c653542ab3af8f9e1f6e3507de835eb53e04036
MD5 1de925f1da2966c4e33c6fa345dc8f36
BLAKE2b-256 cf0d7c1d46a220a2e5e3763feadac3ca61030509e36e90eacb134773a1bd3068

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page