Commit Graph

147 Commits (master)

Author SHA1 Message Date
Ferdinand Thiessen e3b34891b0
chore: migrate to PHPUnit 11
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-11-05 15:42:33 +07:00
Ferdinand Thiessen d6d6747a73 refactor: apply rector rules for PHPUnit 10
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-27 21:56:04 +07:00
Robin Appelman aa15f9d16d
chore: run rector
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-07-01 22:45:52 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Robin Appelman 3561937816
chore: run rector on tests with new rule
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-12 18:38:29 +07:00
Robin Appelman 29e39c0a2e
chore: run rector on tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-12 18:31:58 +07:00
Ferdinand Thiessen e143921896
feat(IUser): add `getQuotaBytes` method to get machine readable quota
Proper replacement for deprecated `OC_Util::getUserQuota`.
Also we still use this in some cases we can now replace, moreover it
just makes sense to have a machine readable format in the API instead of
only the human readable format which is less precise.
Alings also with `getQuota` of the quota storage, which already returned
the machine readable format.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-22 12:50:38 +07:00
Joas Schilling 2c74609e07
test: Fix tests/lib/[S-Z]*
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-15 08:24:59 +07:00
Joas Schilling b77011a918
test: Prepare more tests for PHPUnit 10
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-04-30 09:18:01 +07:00
Joas Schilling 775ca882f3
fix(usermanager): Don't throw when checking if a too long user id is an existing user
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-04-16 17:47:28 +07:00
Christoph Wurst 5003467f98
fix(session): Only mark sessions of permanent tokens as app passwords
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2025-04-03 10:08:15 +07:00
Joas Schilling 522be60ff0
fix(phpunit): Remove some more withConsecutive calls
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-03-31 09:43:22 +07:00
Git'Fellow 18de9be0e2
fix(database): Cast users count to integer
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-03-20 12:00:57 +07:00
Côme Chilliet 3289cbcbd3 fix: Fix UserTest to return valid configuration values
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-10 14:52:18 +07:00
Benjamin Gaussorgues 79db082fe6 fix(users): improve recently active search
- Remove DISTINCT clause to fix PgSQL
- Join user table only if necessary
- Don't show people who never connected in active list
- Add test

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-10-30 07:53:10 +07:00
Ferdinand Thiessen 16833aff86
fix: Make user removal more resilient
Currently there is a problem if an exception is thrown in `User::delete`,
because at that point the user is already removed from the backend,
but not all data is deleted.

There is no way to recover from this state, as the user is gone no information is available anymore.
This means the data is still available on the server but can not removed by any API anymore.

The solution here is to first set a flag and backup the user home,
this can be used to recover failed user deletions in a way the delete can be re-tried.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-26 20:48:37 +07:00
Louis Chemineau 22d5d29c01 fix(users): Don't crash if disabled user is missing in the database
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-09-23 10:40:38 +07:00
Christoph Wurst 49dd79eabb
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 22:32:31 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Christoph Wurst 2b38d6ae7e
fix(session): Log when session_* calls are slow
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-08-07 09:02:10 +07:00
Hamza Mahjoubi a9774741e8 Feat: Allow users to select another user as their out-of-office replacement
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
2024-07-01 15:10:16 +07:00
Andy Scherzinger 1f7e2ba599
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +07:00
Christoph Wurst 21ee7f59bd
fix(session): Do not update authtoken last_check for passwordless
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-04-26 16:05:18 +07:00
Vincent Petry 839ddaa354
feat: rename users to account or person
Replace translated text in most locations

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2024-02-13 21:06:30 +07:00
Git'Fellow 72e0618f20
fix(session): Avoid two useless authtoken DB queries for every anonymous request
Co-Authored-By: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-01-17 09:17:23 +07:00
Julius Härtl a3a343ce41
perf: Use more performant way to obtain and check the email as a login name with token login
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-11-30 20:51:47 +07:00
Anna Larch f19645adab enh(userstatus): add OOO automation and remove calendar automation
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-11-28 10:28:06 +07:00
Richard Steinmetz 8191295f66
feat(dav): dispatch out-of-office started and ended events
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-11-23 17:18:49 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Christoph Wurst 45541eb685
feat(dav): Enable OOO UI and expose enabled via OCP
Makes the feature opt-out now that we have meaningful integrations based
on OOO data. Allows instances still to turn the feature off.

For apps like Mail that build on top of this feature we need to know if
the instance has the feature turned on or off. This is exposed as OCP
API, too.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-11-15 15:53:38 +07:00
Christoph Wurst ab1a1d688d
feat: Add out-of-office message API
[skipci]

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-11-09 10:36:11 +07:00
Joas Schilling 25309bcb45
techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-28 15:50:45 +07:00
Joas Schilling ad12a740cb
fix!: Remove symfony EventDispatcherInterface from User
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 23:13:37 +07:00
Joas Schilling b91957e3df
fix(dav): Abort requests with 429 instead of waiting
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-05-03 22:43:36 +07:00
Côme Chilliet 8d5165e8dc
Adapt tests to config value typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 17:42:14 +07:00
Daniel Kesselberg 39c1b6f49f
chore(tests): add tests for handleLoginFailed
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-03-10 18:04:39 +07:00
Côme Chilliet f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Simon L 7271ec7acf spaces are allowed in userids
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-01-10 13:25:27 +07:00
Côme Chilliet 6f80fe6ada
Remove deprecated at matcher from tests/lib
Only 15 warnings left in there

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-29 16:36:40 +07:00
Carl Schwan 51b9847fad
Merge branch 'master' into display-name-cache-public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-15 15:28:30 +07:00
Côme Chilliet cb271b759e
Fix dynamic property creations in test files
This fixes warnings in PHP 8.2

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-08-01 15:07:53 +07:00
Joas Schilling 6e3d668436
Keep non default protocol in cloud id
When there is no protocol on the cloud id, we assume it's https://
But this means that when an http:// server currently sends an OCM
invite to another server, the protocol is striped and the remote
instance will try to talk back to https:// which might not be available.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-06-09 15:23:05 +07:00
Carl Schwan 9ec0cb0a90 Fix psalm issues related to the user backend
- Reflect the actual return value returned by the implementation in the
  the interface. E.g. IUser|bool -> IUser|false
- Remove $hasLoggedIn parameter from private countUser implementation.
  Replace the two call with the equivalent countSeenUser
- getBackend is nuallable, add this to the interface
- Use backend interface to make psalm happy about call to undefined
  methods. Also helps with getting rid at some point of the old
  implementActions

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-20 17:14:58 +07:00
Robin Appelman 6d6662ec68
expose displayname cache trough a public interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-05-18 03:47:34 +07:00
Côme Chilliet 61f7f13bd8
Migrate from ILogger to LoggerInterface where needed in the tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:26 +07:00
Joas Schilling 0acd4b5f82
Merge pull request #31235 from nextcloud/techdebt/noid/extract-request-id
Extract request id handling to dedicated class so it can be injected without DB dependency
2022-03-22 12:08:45 +07:00
Robin Appelman d08d0ebdda
skip localstorage dependend user test when not using local user storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-25 16:33:11 +07:00
Joas Schilling d078d53683
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-23 11:01:58 +07:00
Carl Schwan 6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +07:00
Joas Schilling 6d33d75be1
Remove unused imports
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-02 14:51:44 +07:00