101 Commits

Author SHA1 Message Date
ulferts 1f78f5ae4d use preference service inside user update service - for backlogs as well 2026-04-02 10:01:24 +02:00
Alexander Brandon Coles 4e73d6c557 Fix wording (docs, UI): change "expiry" to "expiration" 2025-11-11 20:29:03 +00:00
Oliver Günther b1840ebff9 Remove MeetingContent, MeetingMinute, and MeetingAgenda
old tables no longer in use since 16.0
2025-10-24 07:39:25 +02:00
Dombi Attila d22e499820 Validate the register user service 2025-10-14 12:01:58 +02:00
Oliver Günther d1a6fc031e Throw errors if the token/link cannot be created 2025-09-24 13:46:09 +02:00
Oliver Günther 2cda65e828 Use indifferent access for session retaining
Using the TestSession at least, slice is mixing symbols ans strings
2025-09-24 13:46:09 +02:00
Oliver Günther 8fee175faf Assign autologin session link, and use it to show and delete sessions 2025-09-24 13:46:09 +02:00
Pavel Balashou 1323927095 [#65068] Add deleted status to user.
https://community.openproject.org/work_packages/65068
2025-08-27 09:53:37 +02:00
Alexander Brandon Coles 5e9f3827f5 Freeze string literals in app/services
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/services
2025-07-18 17:45:24 +01:00
Pavel Balashou 662f6a535b [#62107] Update SCIM Server API yet another time.
- Disable Rails/HttpPositionalArguments completely.
  It is often not relevant and breaks specs when rubocop -a is used.
- Support excludedAttributes for all enpoints in SCIM Server API
- Fix excludedAttributes to handle nested attributes correctly. e.g. name.givenName
- Respond with 403 whne User can't be deleted due to lack of permissions.
- Refactor scim related code by removing duplication where possible.
- Remove BasicAuth from supported auth schemes.
- Add specific specs to test SCIM authentication.
- Extend specs.
2025-07-01 22:43:53 +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
Jan Sandbrink 40aff02f11 Remove params argument from BaseCallable#perform
This is making the interface of BaseCallable more consistent.
Previously it was unclear, whether the params passed to perform
should be used to reference parameters or whether the attribute accessor
should be used. Different code used different approaches.

To apply this change more consistently, BaseContracted also removed
params from the methods called inside its own perform method, e.g.
before_perform or after_validate.

At a later point we might consider removing this argument from other large
inheritors as well, for example `BaseServices::SetAttributes#set_attributes`.
2025-06-30 11:47:03 +02:00
Pavel Balashou 5fe52f3a64 [#62107] Update a few SCIM related things.
- Enable SCIM Patch.
- Use user_auth_provider_links instead of users.identity_url.
- Extend SCIM ActiveRecord base scopes to join and preload appropriate associations.
- Set a stub for user.firstname and user.lastname if they are not provided by SCIM client.
- Handle user unique constraint vialation according to SCIM spec.
- Move user_auth_provider_links association to principal as group needs it as well.
- Set user.mail dynamically from the list of emails provided by SCIM client.
- Change BaseServices::Create contract to accept model instance as a constructor parameter.
  It gives an option to build associations before model creation.
- extend SCIM server API schema to include externalId.
- Adjust specs.
2025-06-17 11:03:28 +02:00
Pavel Balashou 2db9ef305c [#63912] Support multiple authentication provider user links
https://community.openproject.org/work_packages/63912
2025-06-03 10:13:00 +02:00
Oliver Günther 216def9bdc Remove references to StructuredMeeting, Agenda and Minutes 2025-04-10 08:34:20 +02:00
Jan Sandbrink 3708fa4513 Expose User#authentication_provider as AR class
Previously we only got the slug name of the provider
as a string, which doesn't allow to further use the provider.

Converting it back into its AR representation allows to call
further methods on it, e.g. checking support for certain capabilities.
2025-01-20 14:09:00 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Ivan Kuchin b10e6d718c rubocop autocorrect 2024-06-24 19:01:59 +02:00
Christophe Bliard 933f249641 Merge branch 'release/14.1' into release/14.2 2024-06-11 11:18:48 +02:00
Oliver Günther d9a7194f5a Don't clear invitation tokens on login 2024-06-11 08:27:14 +02:00
Oliver Günther 99e915b2c9 Changing mail address should invalidate tokens on top of session 2024-06-10 15:20:27 +02:00
Ivan Kuchin 192e21cd9e manual rubocop corrections 2024-05-30 19:54:08 +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
Oliver Günther e35426db28 Fix retaining session keys like "user_from_auth_header" 2024-02-06 16:05:58 +01:00
Oliver Günther 6210b085fb Move successful_login out of the retained session yield
Ensure that the successful_login hooks receive all retained values from the session

https://community.openproject.org/work_packages/52185
2024-01-18 11:06:45 +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
Oliver Günther 7bfec434a4 Show autologin tokens in the my/sessions view 2023-11-23 10:45:54 +01:00
Oliver Günther aea036079f Proper logout tests 2023-11-23 10:45:54 +01:00
Oliver Günther 885836184a Rework autologin cookie to not be unique 2023-11-22 16:36:07 +01:00
Oliver Günther 569e759182 Add test for correctly setting limit_self_registration 2023-10-12 13:54:03 +02:00
Oliver Günther 7bdfbc5473 Add test for added error when omniauth provided user is being limited 2023-10-11 16:50:59 +02:00
Oliver Günther 47b32dd5cc Move use_graph_api and self_registration OIDC options into configuration 2023-10-11 16:50:53 +02:00
Aaron Contreras 90dca8c8c8 Update User::ChangePasswordService to activate the current user
* Updates the service to activate the user only if it's currently
  in an "invited" status.

* Updates the service spec.
2023-09-04 09:26:30 -05:00
Oliver Günther e32d2d0058 Remove AuthSource base namespace, model 2023-07-27 08:16:43 +02:00
Oliver Günther 5756195947 Basic session management table 2023-06-21 15:54:24 +02:00
Aaron Contreras 89addda29a Maintain constructor signature (*classes)
In order to keep this constructor flexible and be able to simply
provide class names that warrant replacing, performed a refactor
on the internal works.

I don't believe recursion is strictly necessary and if anything, I feel
a simple "hijack" or "focus" on replacements one by one without the need
for instantiation is simpler to wrap my head around.

Made sure to add some specs to cover both constructor signatures and
expected behavior.
2023-05-15 11:04:02 -05:00
Aaron Contreras 03387ca418 Refactor replacement-finding recursion
Account for multiple column replacements in one model by
identifying unique replacements at a

class + column + condition

level
2023-05-15 11:03:53 -05:00
ulferts 1cf42e1a93 Merge branch 'dev' into fix/merge_wiki_content_into_page 2023-04-28 09:27:18 +02:00
Markus Kahl d6e63adbe2 invalidate recovery tokens after password change
so that unused recovery tokens cannot be used to change
a user's password after they changed it in-app already
2023-04-27 15:48:43 +02:00
Markus Kahl faafa84608 allow to limit self registration for openid connect providers 2023-04-20 14:39:26 +02:00
ulferts a328940c3a merge wiki_content into page 2023-04-05 10:05:20 +02:00
Christophe Bliard c43fccf246 lint: autocorrect Style/HashSyntax
command is

    rubocop -A --only Style/HashSyntax app lib lib_static modules spec
2023-03-07 15:07:44 +01:00
Oliver Günther d573706de1 Bypass self registration for omniauth users
https://community.openproject.org/wp/42390
2023-01-10 14:01:16 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
ulferts e35791503d ensure default language is applied on new user record 2022-11-29 16:31:35 +01:00
Oliver Günther ba2f5e9143 Backchannel logout flow for OIDC 2022-11-23 10:52:31 +01:00
Dombi Attila 6cfe2463ab [#43676] Move all notification settings defaults to the database layer
https://community.openproject.org/work_packages/43676
2022-10-17 23:40:35 +03:00