Commit Graph

122 Commits (e2ea6d46802255cd1dcdedf0c0d5aeabdcaf283d)

Author SHA1 Message Date
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
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
Côme Chilliet a1255539b8 Add endpoint for getting disabled user list
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-10-09 12:04:35 +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
Côme Chilliet 346344c153
Update version number in since and deprecated annotations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-27 12:04:32 +07:00
Côme Chilliet 3c2b126eba
Make code clearer and bump @ deprecated annotations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-27 12:00:07 +07:00
Carl Schwan a4c599c1c9
Split new method in a new group backend interface
Better for backward compatibility, also move new interfaces to nc 26

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-04-27 12:00:01 +07:00
Carl Schwan 35dc223500
Optimize retrieving display name when searching for users in a group
This is recurrent scenario that we are searching for users and then for
each users we fetch the displayName. This is inefficient, so instead try
to do one query to fetch everything (e.g. Database backend) or use the
already existing DisplayNameCache helper.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-04-27 11:57:45 +07:00