Commit Graph

420 Commits

Author SHA1 Message Date
OpenProject Actions CI 82c65d6a27 Merge branch 'release/17.3' into release/17.4 2026-05-20 06:42:24 +00:00
Oliver Günther 6ef24e9075 Merge pull request #23246 from opf/fix/journable-visibility
Explicitly call journable.visible? on the diff controller
2026-05-20 08:41:32 +02:00
Oliver Günther ac4794ad8f Use customizable? to check for non-customizable journables 2026-05-19 18:32:28 +02:00
Oliver Günther 0b08d49f0c Merge remote-tracking branch 'origin/release/17.3' into release/17.4 2026-05-19 11:09:30 +02:00
Oliver Günther ecfe44b22f Add missing msgpack require 2026-05-19 11:08:53 +02:00
Oliver Günther 3494170fdf Merge remote-tracking branch 'origin/release/17.3' into release/17.4 2026-05-19 10:27:20 +02:00
Oliver Günther 6d0b39b466 Merge pull request #23251 from opf/fix/use-message-pack-cache-serializer
Use MessagePack serializer that treats old marshal cache as miss
2026-05-19 10:26:48 +02:00
as-op ed2881f594 [#74746] Avoid additional journal background jobs to be started by Jira import job
https://community.openproject.org/wp/74746
2026-05-07 14:59:44 +02:00
Alexander Brandon Coles 4295e335f9 Move format_date_range to Redmine::I18n
Places the helper next to `format_date` and `format_time` so other
modules can reuse it. Adds YARD docs.
2026-04-20 17:29:58 +01:00
Oliver Günther 98c91275e2 Use scan on raw translate for link_translate building
We changed the way we output translation text in the link_translate
function. By using a SafeBuffer, the original text was already escaped
before it got handled by the link helper.

Instead, we can pass the raw link part of the translation string to the
link helper, allowing it to handle escaping, and output the rest of the
translation manually to the SafeBuffer.

This way, the entire string is subjected to escaping still, but will
allow entities to not be escaped

https://community.openproject.org/work_packages/73513
2026-03-30 09:05:09 +02:00
Oliver Günther 468fa6de78 Adapt tests now that we use link_translate 2026-03-20 09:49:11 +01:00
Oliver Günther 4d731dcab6 Replace raw and explicit html_safe calls 2026-03-20 09:49:10 +01:00
Oliver Günther 00317e7197 Ensure we use renderer, not AC render method itself 2026-03-20 08:53:15 +01:00
Oliver Günther 50e16740ad Allow link attributes on link_translate 2026-03-20 08:53:15 +01:00
Ivan Kuchin 70c21d1255 Merge pull request #22214 from opf/bug/72823-refactor-projectcustomfields-loadservice
Bug/72823 refactor projectcustomfields loadservice
2026-03-10 15:13:16 +01:00
Ivan Kuchin 7296cdd4cf add missing check to custom_comment_for and custom_comment_changes 2026-03-09 17:05:37 +01:00
Ivan Kuchin fa69a60a44 bring order to custom values both in the relation and project custom fields load service 2026-03-05 15:57:33 +01:00
Markus Kahl a89cfaa2ec allow space separated list for IPs, document list delimiters 2026-03-05 12:15:36 +00:00
Markus Kahl 42d97005e2 add OpenProject::SsrfProtection, use it when sending test email to prevent attack 2026-03-05 12:15:35 +00:00
Ivan Kuchin 807c1bc6d5 Use stringify_keys instead of transform_keys(&:to_s)
Co-authored-by: Dombi Attila <83396+dombesz@users.noreply.github.com>
2026-02-25 20:07:28 +01:00
Ivan Kuchin 6a8975b419 handle delete custom fields in human attribute name 2026-02-25 20:07:26 +01:00
Ivan Kuchin 5bdf9f9874 don't use local variables automatically populated for named capture groups 2026-02-25 20:07:26 +01:00
Ivan Kuchin 73803c59cd add admin_only_allowed setting to acts_as_customizable 2026-02-25 20:07:13 +01:00
Ivan Kuchin 51bab06de3 rework setting custom comments to allow setting them also for inacessible custom fields
This should be blocked on contract level
2026-02-25 20:07:09 +01:00
Ivan Kuchin 73f941b11e handle custom comment human attribute name 2026-02-25 20:07:08 +01:00
Ivan Kuchin d5c0b9d84e set comments and show changes even if custom field doesn't allow comments
Otherwise contract doesn't know that there was an attempt to set
attribute
2026-02-25 20:07:08 +01:00
Ivan Kuchin c16dcaf52d add accessors for comments also when has_comment is false 2026-02-25 20:07:07 +01:00
Ivan Kuchin ddcbd6adc3 always return comment_attribute_name even when has_comment is false 2026-02-25 20:07:07 +01:00
Ivan Kuchin ca452da4bb add accessors for custom comments
It was needed by project create contract spec
2026-02-25 20:07:07 +01:00
Ivan Kuchin ba4cc09ffe move custom_comment_for to acts as customizable 2026-02-25 20:07:01 +01:00
Ivan Kuchin 875f600ae3 return changes to comments from custom_field_changes and changed_with_custom_fields 2026-02-25 20:06:59 +01:00
Ivan Kuchin 57a4a894bd include acts as customizable methods at start of call 2026-02-25 20:06:59 +01:00
Ivan Kuchin 09d176c107 allow to assign comments in a way similar to values 2026-02-25 20:06:59 +01:00
Ivan Kuchin 574857a6ba move adding custom_comments relation to acts_as_customizable and mark for autosave 2026-02-25 16:00:32 +01:00
Ivan Kuchin a7854fe6f2 move configuration for ability to have custom comments to acts_as_customizable 2026-02-25 16:00:32 +01:00
Ivan Kuchin 26142f1af8 transform keys to strings instead of converting to hash with indifferent access 2026-02-25 16:00:29 +01:00
Ivan Kuchin b188bda6cb move admin_only check of custom field related activity to the query
This should be more efficient and will ensure "The changes were
retracted" message shown when all changes are hidden
2026-02-25 16:00:26 +01:00
Ivan Kuchin c75b885a63 add custom comment changes 2026-02-25 16:00:25 +01:00
Oliver Günther 6841eb28f6 Extract html_safe_gsub as a core extension 2026-02-19 11:03:42 +01:00
Jan Sandbrink eb73e27e23 Merge pull request #21968 from opf/rename-rest-api-enabled
Rename rest_api_enabled to api_tokens_enabled
2026-02-13 09:52:58 +01:00
Jan Sandbrink d61bb47b2b Rename rest_api_enabled to api_tokens_enabled
The name of this setting was pretty outdated by now.
It might have disabled the entire API in the past, but that time
is long gone. By now the APIv3 can't be disabled at all and OpenProject
would fall apart if it was disabled.

The only thing that this setting changes, is whether users can create
an access token in their account settings and whether tokens created
this way are accepted by OpenProject. So naming and description have
been adapted accordingly.
2026-02-13 09:24:53 +01:00
Jan Sandbrink 85e9e6e076 Merge pull request #21931 from opf/www-authenticate-bearer
Always respond in Bearer method for WWW-Authenticate header
2026-02-12 13:26:58 +01:00
Jan Sandbrink 508c8bbad7 Always respond in Bearer method for WWW-Authenticate header
The intention of this change is to always respond in the metadata-rich
version of the header that indicates things like the required scope and
the URL of the resource_metadata endpoint, which was previously hidden
and only visible if clients used a non-standard HTTP request header.

semantically it's probably the preferable version of the header by now
anyways, because:

* all APIs accept some kind of Bearer token, not all of them accept Basic auth
* Even API tokens can now be passed as Bearer tokens

Practically the Basic auth header also caused unintended browser pop-ups when the frontend
code didn't include the correct request header to avoid the Basic auth offer, this now can't
happen anymore, since the Basic auth version of the header is only returned, if the client actively
tried to authenticate through Basic auth.
2026-02-10 09:02:07 +01:00
Ivan Kuchin bf1182ba7c refactor custom_field_values= to calm down rubocop 2026-02-05 14:15:20 +01:00
Ivan Kuchin 7e91103076 change custom_values_for_custom_field to accept custom field or id and as positional argument 2026-02-05 14:15:19 +01:00
Ivan Kuchin 9b7df9aef3 add custom_field_class method for customized models 2026-02-05 14:15:13 +01:00
Jan Sandbrink 55673ba9f5 Merge pull request #21812 from opf/mcp-personal-access-tokens
Allow to use API Tokens as Bearer tokens
2026-02-05 08:32:15 +01:00
Jan Sandbrink 4d305df714 Allow to use API Tokens as Bearer tokens
We generate those tokens with a prefix, so that we
can decide by looking at a token, whether it's an API Token
or a different kind of token, so that we can decide which
code path to choose for validating the token.

The usage of access tokens as Bearer token has the usability advantage,
that you can paste them as plaintext into tools that expect you
to specify the token as a header.

Also the Basic auth approach for our old tokens usually rather caused
issues, such as browsers prompting for credentials in surprising situations.
If we were to deprecate basic authentication one day, this change today could've
been the first step towards that.
2026-02-05 08:07:04 +01:00
Oliver Günther 1857f25b58 Primerize static link helper and use that for external links consistently 2026-02-03 11:41:43 +01:00
Oliver Günther 3426a5e845 add allowExternalLink dataset to skip link capture 2026-02-03 11:11:40 +01:00