Commit Graph

129 Commits (jtr/fix-public-exceptions-http-codes)

Author SHA1 Message Date
Carl Schwan 9095a36b94 refactor(dbal): Port away from getDatabasePlatform() instanceof pattern
Use getDatabaseProvider instead.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-13 13:44:08 +07:00
Kate 7e8926011d
Merge pull request #55463 from nextcloud/fix/user-group-manager-return-type 2025-10-01 16:30:23 +07:00
provokateurin dce2672b98
fix(IUserManager): Use correct return type for searchDisplayName method
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-10-01 12:48:43 +07:00
provokateurin fb4348e3bc
fix(IUserManager): Fix deprecation of search method
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-10-01 12:08:58 +07:00
Louis Chemineau 1d91e40fe8
feat: Support limit argument in `getSeenUsers`
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-09-05 12:45:38 +07:00
Carl Schwan 5215954ee4 perf(users): Create lazy users in IUserManager::getSeenUsers
Particularly relevant in occ commands/background jobs like the trashbin
expiration which only needs the user ids and not the full information.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-09-03 15:24:02 +07:00
Carl Schwan c21b8169ff refactor(querybuilder): Port away from qb::execute() in lib/
Replace by either executeStatement or executeQuery

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
2025-09-02 11:55:56 +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
Joas Schilling 8b70f59015
chore(cs): Apply autofixes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-29 09:18:12 +07:00
rakekniven 78bd9ad29f chore(i18n): Improved wording
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2025-05-29 01:09:55 +07:00
rakekniven c8da8628c3 chore(i18n): Add hint for translators
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2025-05-29 01:09:55 +07:00
Joas Schilling 1ada9910b1
fix(user): Introduce a public constant for max length of user id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-04-17 09:50:12 +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
Côme Chilliet ddd7d4ed13
fix: Deprecate OC_User methods related to user backends
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-04-10 11:12:25 +07:00
Louis Chemineau 22e02d1c1e chore: Refactor callForSeenUsers to use getSeenUsers
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-03-30 08:54:41 +07:00
Louis Chemineau 275b32d513 feat: Implement getSeenUsers to iterate over users
This method uses an iterator.
This is lighter on resources and gives more control to the caller

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-03-30 08:54:41 +07:00
Côme Chilliet 30382a5d8d chore: Remove now unused methods from User manager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-10 11:30:18 +07:00
Côme Chilliet 0b449f302b fix: Correctly count disabled users for SAML groups subadmins
If too many users return -1 as for LDAP so that link is shown

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-10 11:30:18 +07:00
Côme Chilliet 892f815d2e
fix: Fix a small typing problem is user manager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-14 17:21:40 +07:00
Côme Chilliet e187e4e87f
feat(updatenotification): Add a limit to user count from LDAP so save performances
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-14 12:26:24 +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
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
Ferdinand Thiessen a8f46af20f
chore: Add proper deprecation dates where missing
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-20 00:46:03 +07:00
provokateurin 9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
Anna Larch 8af7ecb257 chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-05 21:23:38 +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
Ferdinand Thiessen 0563757ea4 fix(SetupCheck): Properly check public access to data directory
When checking for public (web) access to the data directory the status is not enough
as you might have a webserver that forwards to e.g. a login page.
So instead check that the content of the file matches.

For this the `.ncdata` file (renamed from `.ocdata`¹) has minimal text content
to allow checking.

¹The file was renamed from the legacy `.ocdata`, there is a repair step to remove the old one.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-08 22:08:42 +07:00
yemkareems 4eba967d63 fix: getLastLoggedInUsers moved from AllConfig/IConfig to IUserManager/Manager
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems ae95e46787 fix: limit and fixLimit removed. negative limit handled in controller. removed getUsersSortedByLastLogin from Manager and instead used the config in controller
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems ceedfb4616 fix: removed default limit of 25. if null is given all users are fetched or if limit is given limit number of users are fetched
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems cfafbc8415 fix: removed references to old disabled users code. refactored query as per getDisplayNames function. limit and offset added to query. default limit set to 25.
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems afa51365ff fix: removed the params related to sortMode and order since it sorts by lastLogin
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems 5b249df686 fix: doc blocks added
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems 695bd042d7 fix: search and searchDisplayNames reverted to how it was initially as sort and order are not required here
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems dc6e8c9c0a fix: search and searchDisplayNames reverted to how it was initially as sort and order are not required here
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems 4cb85f7c9e fix: rebased the branch with master and resolved conflicts
fix: added a new endpoint users/recent and getting users based on last login info in the same. Reverted old code that was breaking LDAP

Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems 76c875a588 fix: change orderBy and sort to sortMode and sortOrder. default it to uid asc. enable email search by changing query
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems c8c68c3510 fix: sort the user getDisplayNames based on lastLogin. Default sort order is lastLogin DESC
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems 87a8013ee3 feat: cs fix run on the changed files and default order by last_login desc. Also last_login sort logic changed
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
yemkareems 0ee676cd51 feat: add ability to sort users by last_login, uid or displayName. one of these needs to be passed as orderBy and sort can be ASC or DESC
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-07-08 15:42:55 +07:00
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Côme Chilliet 8044edf309
fix: Also search in email field for disabled users
To match what is done for Database backend for enabled users

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-05-23 09:09:20 +07:00
Côme Chilliet 6d56f3557d
feat: Add back searching in disabled user list
When disabled users where moved to their own endpoint we overlooked
 search, so adding it back.
The search is done case-insensitive in uid and display name.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-05-23 09:08:31 +07:00
Josh 4509a17cdd fix(User\Manager): Avoid future collisions with updater/audit logs
Avoid future collisions for not yet created updater and audit log files (at least using default names).

Signed-off-by: Josh <josh.t.richards@gmail.com>
2024-05-06 09:20:38 +07:00
Côme Chilliet 672923f0a6
fix: Fix newly spotted psalm issues, add exhaustive typed magic properties for LDAP classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 09:23:58 +07:00
F. E Noel Nfebe 3fb1674251
Merge pull request #43461 from nextcloud/fix/get-rid-of-getlogger
chore: Migrate away from OC::$server->getLogger
2024-02-14 10:47:22 +07:00
John Molakvoæ 524ed97d62
fix: replace `Account name` by `Login`
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2024-02-13 21:08:10 +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
Côme Chilliet c0ce272e9c chore: Migrate away from OC::$server->getLogger
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-13 17:32:30 +07:00
Côme Chilliet b2e9e0fa0d chore: Replace OC::$server->getL10N by OCP\Util::getL10N in lib and some apps
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-05 11:16:04 +07:00