Skip to main content

Beta License: AGPL-3 sygel-technology/sy-server-backend

This module adds a new model to configure Odoo permissions, the “Model Access Restrictions”

This model allows to restrict the access to a model for all users except the ones that belong to at least one group of a list of allowed groups.

While Odoo’s default access rules provide permissions, and having one already gives you access, these new rules remove them, and failing to comply with one restricts your access.

Table of contents

Configuration

To configure this module, you need to:

  • Go to Settings / Technical / Security / Model Access Restrictions

  • Create a new access restriction

  • Select the model to restrict the access

  • Select the operations the rule applies to. If the operation is not selected the restriction won’t apply to that operation which means users will access the model as always.

  • Select the groups that will have access to the model. The rest of groups will have the access disabled.

Interaction between access records

Normal access records give permissions. Access restriction records remove permissions. If a user does not have one group of a restriction, the access will be forbidden.

Detailed algorithm:

  1. Normal access records are combined together with a logical OR operator. If a user has the group of an access record, access will be granted.

  2. Access restriction records are applied before normal access, and combined together with a logical AND operator. If a restriction is not met, the access is forbidden.

  3. A restriction is not met if the user does not belong to any of the allowed groups.

Example: ACCESS_1 OR ACCESS_2 AND (ACCESS_RESTRICTION_1 AND ACCESS_RESTRICTION_2)

  • ACCESS_1: Group: Internal Users

  • ACCESS_2 Group: Administrator

  • ****: Allowed Groups: Internal Users

  • ACCESS_RESTRICTION_2 Allowed Groups: Administrator

An internal user won’t have access in this example because they do not meet the requirement of ACCESS_RESTRICTION_2.
TRUE OR FALSE AND (TRUE AND FALSE) = TRUE AND (FALSE) = FALSE

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

  • Sygel

Contributors

  • Sygel:

    • Alberto Martínez

    • Manuel Regidor

    • Valentin Vinagre

    • Harald Panten

Maintainers

Current maintainer:

tisho99

This module is part of the sygel-technology/sy-server-backend project on GitHub.

You are welcome to contribute.

Metadata

Release files for odoo-addon-model-access-restriction 16.0.1.0.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 odoo-addon-model-access-restriction 16.0.1.0.0.1
File Interpreter ABI Platform
odoo_addon_model_access_restriction-16.0.1.0.0.1-py3-none-any.whl Python 3 none any Details

Release files / odoo_addon_model_access_restriction-16.0.1.0.0.1-py3-none-any.whl

Download URL odoo_addon_model_access_restriction-16.0.1.0.0.1-py3-none-any.whl
Size 52.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3a1613ca2ad50d7ef9ef5316cf922bf8572055381a6a6d975613d2f9f16f1c1
BLAKE2b-256 checksum
How to use checksums
5f2265331a9fdafa728dfbd7b26a7a02b30ff727ef23a6066cca570f1d8ee1f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

16.0.1.0.0.1 This release

1 release file

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