189 Commits

Author SHA1 Message Date
Oliver Günther b8cd556e32 Apply the same uuid check on export of bcf 2026-05-26 21:14:12 +02:00
Eric Schubert 5723f8a12f [chore] add anonymous fallback for bcf api scope
- our APIv3 relies on having a non-null user
- if all auth strategies fail, the anonymous user is set to User.current
- bcf api is mounted in the root api - path is /api/bcf/v2_1 - that is
  the reason for the need of being able to fallback to anonymous user in
the bcf api scope
2026-05-12 08:13:14 +02:00
Oliver Günther a9dbedcb9a Fix spec 2026-04-28 15:48:27 +02:00
Oliver Günther 88fcec8355 Improve ifc model direct upload verification
https://community.openproject.org/work_packages/74371
2026-04-28 15:48:27 +02:00
Oliver Günther ffcc2d1dab Properly escape input to path helpers 2026-04-13 17:15:01 +02:00
Jan Sandbrink f9d8bc6614 Introduce SubclassResponsibility error
This error is intended for cases when a method is
intentionally not implemented, because the module/class defining
it expects a subclass (or class including the module) to implement
the method.

This is intended to distinguish it from other cases, such as:
* feature not implemented yet
* edge case of a method call not yet supported

Notably it avoids the misuse of the Ruby-defined NotImplementedError,
which is only intended for much more specific scenarios:

> Raised when a feature is not implemented on the current platform. For example, methods depending on the fsync or fork system calls may raise this exception [...]

Also see https://docs.ruby-lang.org/en/master/NotImplementedError.html
2026-03-27 08:14:56 +01:00
Eric Schubert b45dd001f0 [fix] fix rubocop issue and failing test expectation 2026-03-03 16:50:28 +01:00
Eric Schubert 068f3680d4 [fix] check for sane file references when importing bcf 2026-03-03 15:40:02 +01:00
Eric Schubert 84d2e87fc3 [#71949] fix path traversal vulnerability on exporting BCF
- https://community.openproject.org/work_packages/71949
- sanitize BCF data on export
- only create viewpoint files if GUID has the correct format
2026-02-16 20:50:14 +01:00
Jan Sandbrink 953ab1a6a8 Fix API::Errors::InternalError class
This class got broken during what seems to be a
drive-by style-improvement in fbe1215365. That change:

* made it incompatible with frozen strings as error messages
* broke the intended hiding of messages if they came from the
  wrong class

All of this went by unnoticed, because there were no specs
for the InternalError class.

Specs have now been added and the previous version of the code
mostly restored. Since there were some callers that always created the
exception with known safe error messages, I added a new class just for these
cases, because they were intended to "just show the message". So we can
keep using the original implementation for rescue_from handling.
2026-02-09 11:04:57 +01:00
Henriette Darge 8f60babb96 Fix some more tests && render the revit add-in entry normally via the menu initializer and only toggle the visibility via JS 2025-07-24 11:30:07 +02:00
Henriette Darge 82fd47abf6 Remove obsolete design variable 2025-07-22 12:08:12 +02:00
Pavel Balashou ac2e333967 Merge remote-tracking branch 'origin/dev' into feature/62107-add-scim-server-api 2025-07-02 16:02:24 +02:00
Christophe Bliard eefee87284 Merge pull request #19367 from opf/bugfix/65138-argumenterror-during-seeding-after-16-1-1-deployment
[65138] Do not seed if required references are missing
2025-07-01 12:22:00 +02:00
Pavel Balashou d187b2aab7 Merge remote-tracking branch 'origin/dev' into feature/62107-add-scim-server-api 2025-07-01 10:02:12 +02:00
Christophe Bliard b0716517e4 [65138] Do not seed if required references are missing
https://community.openproject.org/wp/65138

The seeders now have the ability to declare the attributes containing
references to other objects. If those references are missing, the seeder
will not run.

This is used on some seeders to avoid raising an error when seeding on
an instance without any workflows (see bug 65138)
2025-07-01 08:36:32 +02:00
Henriette Darge 7dacdbfee3 Merge pull request #18981 from opf/63888-move-project-selector-to-the-sidebar
[63888] Move project selector to the sidebar
2025-06-30 15:57:39 +02:00
Kabiru Mwenja b52debb70d Style/ItBlockParameter: Use it block parameter.RuboCopStyle/ItBlockParameter (#19318) 2025-06-26 13:36:49 +03:00
Henriette Darge d983851576 Remove main-menu-bg-hover-color from set of configurable design variables. Instead we use the Primer behaviour for ActionLists 2025-06-25 15:47:26 +02:00
Pavel Balashou b0b20c90d7 Merge remote-tracking branch 'origin/dev' into feature/62107-add-scim-server-api 2025-06-24 11:12:33 +02:00
Oliver Günther d0a3ce57cc Replace format_time_as_date with format_date
https://community.openproject.org/projects/openproject/work_packages/63911/activity
2025-06-18 09:21:25 +02:00
Pavel Balashou 7031218224 Merge branch 'dev' into feature/62107-add-scim-server-api 2025-06-13 10:25:45 +02:00
Pavel Balashou af05f29bbf [#62107] Add SCIM server API
https://community.openproject.org/work_packages/62107
2025-06-05 13:16:44 +02:00
Jan Sandbrink 7c978030be Make warden available across entire application
This will be required to use warden for our SCIM endpoints as well,
which are implemented in rails controllers. Since Rails controllers do
not support mounting rack middlewares partially (the way that e.g. Grape does),
the mounting of warden needed to be moved.

This was not super straight-forward, because of load order issues:

* Requiring a Rails middleware must be done before initialization finished
* Our warden config was so far done _after_ initialization
* static_routes were defined in lib, which is automatically reloaded,
  but auto-reloading code is not allowed during initialization
    * lib_static which is autoloaded_once is fine during init,
      this is also where the rest of warden authentication is defined

Additionally warden was configured to not handle HTTP 401 responses generated
by the upstream app itself. Warden will only be responsible for its own authentication
failures and it's still possible to invoke the warden failure app by throwing the :warden
symbol, but the application keeps its capability of responding with custom 401 responses.
2025-05-26 13:19:56 +02:00
Bruno Pagno c2886046cd update comment permission names 2025-04-24 13:12:32 +02:00
Henriette Darge dde5595530 Update permissions since the index route does not exist any more 2024-11-29 08:22:58 +01:00
Christophe Bliard bfe9339461 [58689] Eager load relations on work_packages api
https://community.openproject.org/wp/58689

Eager loaded relations are `author` user, `assigned_to` and
`responsible` principals, `priority`, and `bcf_issue`.
2024-10-31 09:41:11 +01:00
ulferts 8b004a1ee4 use named parameter 2024-08-30 16:18:56 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Henriette Darge 0192773f96 Replace angular sidemenu with rails based Submenu component for BIM module 2024-06-28 10:37:56 +02:00
Henriette Darge 4f2b8d39c2 Replace old icons with Octicons inside the main menu 2024-06-11 12:46:23 +02:00
Ivan Kuchin fa5d03eae0 rubocop safe autocorrect all except Rails/WhereRange 2024-05-30 19:54:08 +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
Jens Ulferts cd84d8e82c Merge pull request #14990 from opf/feature/hide-bundled-plugins
Hide bundled plugins
2024-03-19 15:19:10 +01:00
Henriette Darge 9c9b3c581c Add high contrast logo for BIM mode 2024-03-18 13:09:12 +01:00
Oliver Günther 23d49f9d38 Hide bundled plugins 2024-03-13 09:26:22 +01:00
Henriette Darge 484487b973 Rename "content-link-color" to "accent-color" 2024-03-08 14:10:31 +01:00
Henriette Darge c71b37e8aa Remove occurences of primary-color as it was discarded 2024-03-08 14:10:31 +01:00
Henriette Darge c9b93b75f9 Rename "alternative-color" to "primary-button-color" in code 2024-03-08 14:10:30 +01:00
Henriette Darge 139e75c501 Remove primary-color-dark and replace with calculated darker version of the primary color 2024-03-08 14:10:30 +01:00
Oliver Günther d4d1ba053a Merge pull request #14928 from opf/bug/52958-inconsistent-green-buttons-custom-color-settings-are-not-applied-to-project-create-button
[52958] Inconsistent green buttons / custom color settings are not applied to project create button
2024-03-06 11:29:10 +01:00
Henriette Darge 3251555be9 Add migration to change the default value of the alternative color 2024-03-06 09:30:40 +01:00
Henriette Darge 019581578f change default alternative color to the value of Primer and take care, that the Primer buttons have the same color in case it is adapted 2024-03-05 15:22:00 +01:00
ulferts ec29bf8d33 column registration 2024-03-01 10:01:07 +01:00
Christophe Bliard 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +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
Klaus Zanders ba7f27c9f5 Merge branch 'dev' into replace-remaining-allowed-calls 2023-11-06 16:29:08 +01:00
Klaus Zanders 9ecf3a1b49 More remaining permission check removals 2023-10-31 15:03:00 +01:00