189 Commits

Author SHA1 Message Date
Oliver Günther d314c487d5 Use registry for associated journal objects, not hard coded map 2026-05-07 10:34:06 +02:00
Jan Sandbrink cc75f5ded4 Remove unused feature flag
Checking for the flag was removed already, but its definition
was not yet removed.
2025-12-09 08:35:31 +01:00
Jan Sandbrink 389835e6bf Fix translation of dry validation contracts
Sometimes dry-validation would overwrite our custom english
messages with its default messages, recognizable by lacking a
dot at the end.

By using our own top_namespace AND ensuring that dry doesn't load
its own translations, this could be fixed. It means that we will have
to define all messages ourselves, we can't rely on default translations.
2025-09-09 15:58:30 +02:00
Marcello Rocha e9daa1ea51 FeatureDecision for Sharepoint and Renaming of namespaces (#19953)
* Adds FeatureDecision. Initial steps on SharePoint -> Sharepoint rename
* Update I18n keys to use sharepoint over share_point
* Adds handling of the drives on the file picker
* Upload Strategy handling plus FileLink Contract ammendment
2025-08-20 14:53:49 +02:00
Marcello Rocha d8c3d3450d [64180] Creating the Sharepoint Storage Model (#19541)
* Drafting a draft implementation draft
* Adds missing token exchange scope
* Remove all mention to list constants
* Changes to SharePoint rather than Sharepoint
* Addresses feedback by @kharonus
* Remove PROVIDER_TYPES
2025-07-17 16:07:41 +02:00
Pavel Balashou b78678c5ec Load STI models explicitly.
Due to STI nature it is required. Otherwise undesired behavior is possible
in dev and test environments(where usually lazy loading is enabled).
The udesired behavior can be like:
  Fetching not loaded yet STI model through its parent model
  (e.g. `User.find(service_account_id)` raises `ActiveRecord::NotFound`, because
  `ServiceAccount` has not been referenced yet.

`SubclassRegistry` has been removed, because:
1. `.register_subclasses` and `.registered_subclasses` produce unexpected results.
    ```ruby
      # e.g.: Principal -> User -> ServiceAccount
      Principal.register_subclass(User)

      # Then
      Principal.registered_subclasses == [User] # true
      User.registered_subclasses == [User] # true
      ServiceAccount.registered_subclasses == [User] # true
      # Having User as a subclass of User and ServiceAccount seems to be weird.
    ```

2. There seems to be no big win in have the additional list of subclasses that have to be manually filled.
3. Used in commit apprach seems to be simpler.
   It is just calling STI classes explicitly in to_prepare block of configuration.
2025-06-20 17:00:08 +02:00
Jan Sandbrink d6d9c54741 Frozen string literals for storages and openid_connect
Enforce frozen string literals across the storages module and
the openid_connect module.
2025-05-05 09:19:08 +02:00
Jan Sandbrink 6a4cd884e1 Rework "open storage" action
The previous implementation was a deeply nested decision tree for
different error cases or other unexpected states.

Most of this was necessary, because setting up correct permissions is partially
happening asynchronously. Some of the redirects would eventually have rendered a modal
that would periodically check whether user permissions appeared in the background.

All of this was replaced by an approach where we immediately (synchronously) ensure
that the setup is correct.
2025-04-29 11:07:17 +02:00
Jan Sandbrink 6785cf87e7 Failed HTTP requests do not raise errors from TOKEN_OBTAINED_EVENT
We will now propagate HTTP errors upwards as failed service results,
top-most they are only logged, but will not raise an error anymore.

We can do this, because a missing remote identity will be shown to
the user as an error anyways. On the other hand raising an error
from the OpenProject::Notifications breaks the code performing
the original token fetching and prevents display of the nice error
message in the UI.
2025-03-05 16:51:37 +01:00
Pavel Balashou aae3b48ba5 [#61178] Add test related to RemoteIdentity upd. 2025-02-28 17:52:24 +01:00
Pavel Balashou 7445f846db [#61178] Address PR comments.
- Use SpecificBearerToken as a name for new auth strategy
- Add scope to filter storages by audience
- Do not emit REMOTE_IDENTITY_CREATED event if there are no changes to the model
- Use TOKEN_OBTAINED_EVENT for event exposed by openid_connect module
- Fix fetching of RemoteIdentity data in all cases to be correct, I hope :)
2025-02-28 14:11:06 +01:00
Pavel Balashou 2277dec69f [#61178] Update RemoteIdentity after token obtained. 2025-02-27 14:02:56 +01:00
Ivan Kuchin 0b8308e419 unify procs and lambdas in module menus 2025-01-16 15:11:37 +01:00
Jan Sandbrink 07a2b146ae Add short-hand syntaxes to add reference replacements
There is now add_replacements which accepts a hash, allowing to
add multiple replacements in one call. This should make mass-adding
replacements look less bulky.

Also including helpers to ActsAsOpEngine to make adding replacements
from a module nicer.
2024-12-19 11:09:19 +01:00
Jan Sandbrink 4536859663 Refactor ReplaceReferencesService
Instead of expecting modules to selectively overwrite
methods of this class, we offer an explicit extension point
where replacements can be registered explicitly.

Thus patching the implementation is not necessary anymore, instead
it can be configured from initializers.
2024-12-19 08:24:41 +01:00
OpenProject Actions CI e54011a631 Merge branch 'release/15.1' into dev 2024-12-19 03:41:29 +00:00
Oliver Günther 6dc3ede584 Replace references 2024-12-18 10:49:59 +01:00
Bruno Pagno e711b17bed implement API for creating folt statusders 2024-12-10 18:07:21 +01:00
Kabiru Mwenja 141b3b40d5 Merge branch 'release/14.5' into dev 2024-09-06 12:55:10 +03:00
Kabiru Mwenja 7ea5acd357 [Op#57662]: Trigger AMPF Sync Job when folder mode is switched from/to "automatic" mode (#16637)
https://community.openproject.org/wp/57662
2024-09-06 12:52:30 +03:00
Eric Schubert 2ac1107e97 [#57286] refactored nextcloud command for set_permission
- https://community.openproject.org/work_packages/57286
- adapted set_permission interface with contracted input data
2024-09-04 12:38:20 +02:00
Marcello Rocha 6aa505f6c7 Initial mess 2024-09-03 14:27:36 +02:00
Kabiru Mwenja 334707117f [#57255] Remove "Enabled for projects" feature flag (#16482)
https://community.openproject.org/work_packages/57255
2024-08-21 10:10:48 +03:00
Eric Schubert aadd251b70 [chore] introduce dry-validation for input data validation
- adapted command and sync service to new input model
- fixed test setup
2024-08-19 11:35:36 +02:00
Oliver Günther 9dd1b79abe Merge remote-tracking branch 'origin/release/14.4' into dev 2024-08-13 10:05:30 +02:00
Marcello Rocha 291ad4be4b Introduce RemoteIndentity to decouple remote user ids from oauth tokens (#16366)
* Introduce RemoteIndentity to decouple remote user ids from oauth tokens

* Introduce RemoteIndentity to decouple remote user ids from oauth tokens

* Move dependent destroy to DB layer via ON DELETE CASCADE for remote identities

* Appease rubocop on has_many

---------

Co-authored-by: Wieland Lindenthal <w.lindenthal@forkmerge.com>
2024-08-09 19:00:05 +02:00
Oliver Günther 12ee9e6b83 Merge remote-tracking branch 'origin/idea/56781-remove-years-from-copyrights' into dev 2024-08-06 10:17:59 +02:00
Christophe Bliard cdb0505ded refactor: Remove useless top-level :: when defining classes
It was messing up with ruby-lsp extension of vs code.
2024-08-01 07:23:09 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Judith Roth 6d81a5df98 [#55962] Use custom filter for projects activated in storage
including archived projects
https://community.openproject.org/work_packages/55962
2024-07-09 10:53:12 +02:00
judithroth 5c9ba0dcb7 [#55960] Add the enabled in projects tab in storage edit view (#15990)
https://community.openproject.org/work_packages/55960
2024-07-04 10:48:38 +03:00
Marcello Rocha 98084027f5 Introduces a job that runs on a per storage basis
Cleans up the big job
Update Event handling
Extracts the debounce logic to a module, so it can be reused by other jobs
2024-06-28 13:28:41 +02:00
Klaus Zanders db580141cc Move ProjectQuery model to the main namespace 2024-06-26 16:23:10 +02:00
Eric Schubert c798787d15 Merge pull request #15798 from opf/code-maintenance/55193-rename-permission-manage_storages_in_project-to-manage_files_in_projects
[#55193] change permission name
2024-06-13 12:55:20 +02:00
Henriette Darge 4f2b8d39c2 Replace old icons with Octicons inside the main menu 2024-06-11 12:46:23 +02:00
Eric Schubert 19d66a9c0f [#55193] change permission name
- manage_storages_in_projects to manage_files_in_projects
- change usage through app
- projects->deactivate_work_package_attachments is now only available
  through manage_files_in_projects
2024-06-10 14:29:02 +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 c3d0ebc531 Merge remote-tracking branch 'origin/release/14.1' into dev 2024-05-21 09:36:33 +02:00
Pavel Balashou 8e218bf975 Merge branch 'release/14.1' into feature/55035-remove-files-module-from-project-modules 2024-05-17 18:10:35 +02:00
Pavel Balashou 6b37ad446b [#55035] Remove Files module from project modules
https://community.openproject.org/work_packages/55035
2024-05-17 11:21:59 +02:00
Pavel Balashou 3d51ab9894 [#55089] [#55022] Improve File settings UI.
PageHeader title and breadcrumbs change when switching tabs
https://community.openproject.org/work_packages/55089

Tabs in "Project settings" / "Files" should have URLs
https://community.openproject.org/work_packages/55022

Original feature: https://community.openproject.org/work_packages/53672
2024-05-16 17:52:07 +02:00
Christophe Bliard f7d4a43f2d Add comment about cron expressions meaning 2024-05-16 10:25:34 +02:00
Pavel Balashou ad88c1f136 [#53672] Hide attachments in Files tab
https://community.openproject.org/work_packages/53672
2024-05-03 09:46:33 +02:00
Pavel Balashou c13237914c [#54356] Move permissions from FILE STORAGES to WORK PACKAGES section
https://community.openproject.org/work_packages/54356
2024-04-23 17:30:02 +02:00
Pavel Balashou b29a5bdac5 Define manage_storages_in_project in storages.
But without storages module dependency.
2024-04-22 11:49:26 +02:00
Pavel Balashou 092997975a [#54178] Activate Storage module when a user has "Manage file storages in project" permission
https://community.openproject.org/work_packages/54178
2024-04-18 11:02:45 +02:00
Ivan Kuchin 6678cab48d auto correct quotes 2024-03-28 18:22:34 +01:00
Andreas Pfohl f4e6a548ac Merge remote-tracking branch 'origin/dev' into implementation/50915-send-an-email-with-the-information-and-how-to-fix-it 2024-03-22 09:05:45 +01: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