Files
Christophe Bliard d8f0788850 Introduce visible to control a permission visibility in admin
Attribute `enabled` can not be used dynamically to control if a
permission is available or not. Because enabled permissions is cached at
in a class instance variable, this can fails in a multi-tenant
architecture. For instance if the lambda reads a feature flag, the
permission will be enabled depending on the feature flag of a tenant.
Other tenants having a different value for this feature flag will get an
unexpected behavior.

That the origin of the bug https://community.openproject.org/wp/56064

So from now on, `enabled` is no longer a `Permission` initialization
parameter and is always initialized to `true`. It can be turned off at
boot time (for instance when using `OPENPROJECT_ENABLED_MODULES`). It
must not change during runtime.

Visibility in administration is now controlled with a new variable named
`visible`.

The two permissions previsouly relying on `enabled` proc,
`:create_backup` and `introspection`, are now using `visible` instead.
2024-09-02 16:19:48 +02:00
..