29 Commits

Author SHA1 Message Date
Mir Bhatia c8148ab799 Fix more redirection HTTP statuses 2026-04-22 16:44:50 +02:00
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
Oliver Günther fa99c5bef6 Render with status: :unprocessable_entity 2024-10-11 08:42:58 +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
Pavel Balashou 6363263153 [#55112] Rename Storages::ManageNextcloudIntegrationJob
https://community.openproject.org/work_packages/55112
2024-05-21 11:11:09 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Oliver Günther 337eda7dfa Revert "Revert "Merge pull request #12998 from opf/task/48717-replace-delayedjob""
This reverts commit dfa75621ea.
2024-03-07 13:59:24 +01:00
Markus Kahl dfa75621ea Revert "Merge pull request #12998 from opf/task/48717-replace-delayedjob"
This reverts commit 9f3e4c48ea, reversing
changes made to 10412f7c85.
2024-03-07 12:40:15 +00:00
Pavel Balashou fd6a899b29 [#48717] Replace DelayedJob with GoodJob.
https://community.openproject.org/work_packages/48717
2024-02-14 10:18:27 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
ulferts 2b2abf864a introduce ProjectRole model 2023-10-09 14:34:20 +02:00
Aaron Contreras 50411493f5 Scope visibility to Non Work Package Roles in Settings
It's agreed that the settings panel should have no notion that
Work Package Roles even exist until we decide to make them editable
by users.
2023-08-31 11:31:35 -05:00
Pavel Balashou 89fac9d474 Apply a couple of refactorings.
- Introduce Roles::DeleteService
- Add a specific spec for testing event handlers behaviour
- Apply minor improvements
2023-08-02 16:25:34 +02:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +02:00
Christophe Bliard 85b3258a29 Autocorrect with some rubocop cops
RSpec/Rails/InferredSpecType and Style/RedundantConstantBase

rubocop --autocorrect-all --only RSpec/Rails/InferredSpecType,Style/RedundantConstantBase spec modules/*/spec
2023-01-13 14:28:59 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
ulferts ef872fc8a2 replace legacy spec 2022-09-28 23:14:41 +02:00
Dmitrii 4921e537c0 [#21754] Log time for other users 2022-07-20 16:51:38 +02:00
Christophe Bliard b50855a955 Use ServiceResult factory methods where possible
All was automatic through the use of `rubocop --autocorrect --only
OpenProject/UseServiceResultFactoryMethods app lib lib_static modules
spec`.
2022-06-16 10:01:57 +02:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts 0ffea0dc5a fix specs 2019-05-31 20:36:33 +02:00