Model Access Restriction

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:

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)

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.