59 Commits

Author SHA1 Message Date
ihordubas99 1e09c24945 Implementation/72687 new connection error restore banner v2 (#22591)
---------

Co-authored-by: Kabiru Mwenja <k.mwenja@openproject.com>
2026-03-31 16:25:18 +03:00
Kabiru Mwenja 6cdab7b170 Remove documents refresh token from oauth route
Documents refresh tokens are not OAuth specifi; they are session bound
and hence do not fit correctly within the "oauth" route
2026-01-26 20:18:48 +03:00
Kabiru Mwenja 0bfc130577 Implement OAuth token refresh for collaborative documents
Client proactively refreshes tokens before expiry using session auth,
then sends new token to Hocuspocus server via stateless channel.

Token strategy: 5min access tokens, refresh at 80% lifetime (~4min),
session-based refresh (no refresh tokens needed).

Flow:
```
Client                              OpenProject                         Hocuspocus
  │                                      │                                   │
  │── initial token ─────────────────────┼──────────────────────────────────►│ onAuthenticate
  │                                      │                                   │
  │  [timer: 80% of expiry]              │                                   │
  │                                      │                                   │
  │── POST /documents/{id}/oauth/refresh_token ─►│                           │
  │◄─────────────── {token, expires_at} ─│                                   │
  │                                      │                                   │
  │── sendStateless(REFRESH:<token>) ────┼──────────────────────────────────►│ onStateless
  │                                      │                                   │ (update context.token)
```

* https://community.openproject.org/wp/68460
* https://community.openproject.org/wp/70362
2026-01-21 18:56:02 +03:00
Bruno Pagno 651a7928db listen to live update events and rerender last_saved_at 2025-11-27 15:35:45 +01:00
Kabiru Mwenja f467c6b783 Add persistent connection monitoring for BlockNote collaboration (#21204)
Implement server-side error templates and continuous connection monitoring for the BlockNote editor when the Hocuspocus collaboration server becomes unreachable.

Flow:

-   Initial load, server down: Timeout 10s → Error notice
-   Server comes up: 'synced' event → Editor Recovery notice
-   Server goes down again: 'disconnect' event → Error notice

Ref: https://tiptap.dev/docs/hocuspocus/provider/events

https://community.openproject.org/wp/68801
2025-11-26 18:24:52 +03:00
Kabiru Mwenja 0564b9a8b9 Use singular resource for documents collaboration settings 2025-11-24 18:43:11 +03:00
Kabiru Mwenja 97ac9799b2 Add real-time collaboration settings admin form 2025-11-24 12:55:03 +03:00
Kabiru Mwenja 2fd7fdf9bf Merge pull request #21119 from opf/implementation/69261-deprecate-document-categories-admin-ui
Implementation/69261 deprecate document categories admin UI
2025-11-21 13:20:22 +03:00
Kabiru Mwenja 2b7b8326af Merge pull request #21097 from opf/implementation/69146-add-document-types-admin-page
Implementation/69146 add document types admin page
2025-11-21 13:03:07 +03:00
Kabiru Mwenja e100571cd1 Remove document category model traces 2025-11-21 12:57:40 +03:00
Kabiru Mwenja bb790acdb3 Define base structure for document types admin UI 2025-11-20 20:33:02 +03:00
Bruno Pagno 1c2d38f385 show live list of connected users on documents 2025-11-19 14:31:07 +01:00
Kabiru Mwenja 58ea04e9e1 Add collaborative documents deletion flow 2025-11-18 11:27:05 +03:00
Kabiru Mwenja 1e5323287d Implementation/68941 Inline editable document title (#21022)
https://community.openproject.org/wp/68941
2025-11-14 12:56:36 +03:00
Kabiru Mwenja 30cfc06759 Begin collaborative document show/edit view with page header 2025-11-12 18:00:14 +03:00
Kabiru Mwenja eb80c41b93 Merge branch 'dev' into merge-release/16.6-20251030034614 2025-10-30 16:22:14 +03:00
Kabiru Mwenja 14c559bb45 Separate document search to dedicated action
The split allows definitive response types- i.e html vs turbo-streams.
This is specifically needed in destroy actions via `turbo_method: :delete` where
turbo will "force" turbo stream requests if the controller supports the format.
2025-10-28 16:47:28 +03:00
Judith Roth 459c55aef5 [#67403] Basic file upload from blocknote (to server or storage)
https://community.openproject.org/wp/67403

Working, but not yet polished
2025-10-24 09:32:31 +02:00
Kabiru Mwenja 517016256d Add document menu filters 2025-10-21 19:57:44 +03:00
Jan Sandbrink 4bf16e5215 Freeze string literals in two more modules
Diff was achieved by running

    rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze

for the module folders of the affected modules.
This change is part of the effort to slowly roll out frozen
string literals across the entire application.
2025-06-30 09:51:24 +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
Oliver Günther 03a96eefb4 Primerize and separate enumerations 2025-02-25 20:12:00 +01:00
Oliver Günther d0ef27dcb6 Introduce registry to ensure we eager load all of them 2024-08-22 14:41:23 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Henriette Darge 4f2b8d39c2 Replace old icons with Octicons inside the main menu 2024-06-11 12:46:23 +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
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
Aaron Contreras 273970eeb3 Set permissible_on definitions on documents module 2023-08-31 08:34:19 -05:00
Oliver Günther e08203c8c4 Remove pandoc and option to migrate from textile 2023-07-31 19:22:16 +02:00
Eric Schubert 4d05975675 [#47362] Replace spot-icon with boxed icons
- https://community.openproject.org/work_packages/47362
- added new icon font for spot icons
- replaced container containing spot-icon with `inline-flex`
2023-04-25 09:43:03 +02:00
Christophe Bliard 9e865b4f7b lint: Run rubocop safe autocorrect
Command is `rubocop --safe --autocorrect app lib lib_static modules spec`
2023-03-09 10:25:57 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
ulferts 89cfee203f remove usage of require_dependency
according to the rails 6 migration guide, it should no longer be necessary: https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#require-dependency
2022-01-07 14:46:21 +01:00
ulferts eae6749562 remove acts_as_customizable from enumerable 2021-11-02 22:04:15 +01:00
ulferts 5882a82119 alter default for project id param in menu 2021-11-01 15:56:43 +01:00
Oliver Günther 88ea806265 Remove add_attachment as no longer in use 2021-09-27 14:52:48 +02:00
Oliver Günther 612572190a Remove notified events 2021-09-27 10:55:26 +02: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 9d76f80f78 fix notifiable settings for document_added
The notified_event `document_added` was never added to the list of possible events. Because of this, the mail was not delivered
2021-08-26 14:20:01 +02:00
Henriette Darge 2ee3a06c63 * Remove dead links (#9453)
* Use .org website address consistently
* Remove community address as homepage as it does not really offer any value
2021-07-14 15:51:09 +02:00
ulferts 9fa5599392 Feature/member notifications (#8958)
* spec with correctly scoped links

* move db check into own file - fix deprecation

* basic spec for member creation service

* use constants for all notifications

* send an OP notification after member has been created

* send an OP notification after member has been updated

* mails on group member added

Depending on whether the membership existed before or not, an updated or
a created notification is send. This is done asynchronously.

* move all mail sender background jobs into namespace

* wip

* wip

* correct handling group member notifications

* add setting enable/disable mail sending on member alterations

* use services in members controller

* move Notifiable to OpenProject

* remove member after save hooks

* cleanup/testing/linting

* render member mails in receiver locale

* remove add_member! method

* use mailer layout for all mailers

* Update app/services/groups/cleanup_inherited_roles_service.rb

Co-authored-by: Oliver Günther <mail@oliverguenther.de>

* use around callback to avoid prepending

* handle nil params

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2021-04-20 13:45:42 +02:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01: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
ulferts 0fbd3faeda place members menu right before project settings 2020-09-17 13:05:28 +02:00
Oliver Günther 90f2b5157a Remove patches for document links generation and re-add meetings 2020-09-03 12:58:55 +02:00
Oliver Günther 623f8c772e Move module assets to frontend 2020-06-29 11:36:39 +02:00
ulferts 64d0f57d85 Feature/aggregated activities (#8221)
* use cte for aggregated journal

* Revert "use cte for aggregated journal"

This reverts commit 5fedefefdd.

* add another subselect that could later on be provided from the outside

* allow passing a nukleous sql to aggregated journals

* wip - using aggregated journal for activity

* new sql for aggregated journals

* start implementing new aggregated query

* additional documentation

* consolidate activity functionality

* simplify by turing into instance methods

* move activity fetcher out of redmine

* remove verb verification made obsolete

Without catchall routes, the dispatching handles it

* remove duplicate authorize check

* refactor activities controller

* refactory activity fetcher

* cache avatar file

* sort choosable events

* remove legacy spec covered by contemporary

* speed up aggregated journals via CTE

* instance var might never have been set

* ensure the event_types are always transmitted

* correctly reset the avatar cache

* fix avatar fetcher expectation regarding wiki pages

* adapt spec

[ci skip]
2020-04-27 08:04:28 +02:00