6 Commits

Author SHA1 Message Date
Mir Bhatia c8148ab799 Fix more redirection HTTP statuses 2026-04-22 16:44:50 +02:00
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
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Christophe Bliard a885fef2bd Conform to RSpecRails/HaveHttpStatus cop
With a hack to get `have_http_status` to work with `Rack::MockResponse`.
2024-06-24 17:50:57 +02:00
Markus Kahl 9e65bca609 address rubocop comments 2024-06-03 10:44:37 +01:00
Markus Kahl 547bd8c65c pull introspection impl into github integration, add specs 2024-06-03 10:39:49 +01:00