John Molakvoæ
eb374a74c7
Merge pull request #45020 from Noodlesalat/fix-lastlogin-update-token-login
2024-09-17 23:54:37 +07:00
Christoph Wurst
c57e684e7b
fix: Handle null checks with the ?? operator
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 21:50:11 +07:00
Christoph Wurst
614f9ec0a2
refactor: Use the elvis operator
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 21:01:34 +07:00
Fabian Dreßler
1d6cce8a25
fix: update last_login timestamp for token based-logins
...
fixes #31075 and maybe #32953
Signed-off-by: Fabian Dreßler <nudelsalat@clouz.de>
2024-09-06 14:11:41 +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
Arthur Schiwon
6a783d9b08
fix(Session): avoid race conditions on clustered setups
...
- re-stablishes old behaviour with cache to return null instead of throwing
an InvalidTokenException when the token is cached as non-existing
- token invalidation and re-generation are bundled in a DB transaction now
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-07-10 13:28:33 +07:00
Pytal
3a97dbf248
Merge pull request #46123 from nextcloud/feat/user-password-hash
...
feat: Allow getting/setting the password hash of a user
2024-07-09 08:00:01 +07:00
Christopher Ng
c390ae94ff
feat: Validate password hash
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2024-07-08 16:31:42 +07:00
Christopher Ng
dba00560d2
perf: Return cached password hash
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2024-07-08 16:30:52 +07:00
Christopher Ng
34d97d45cf
feat: Allow getting/setting the password hash of a user
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2024-07-08 16:30:52 +07:00
Christopher Ng
a330f4c9d5
feat: Implement IPasswordHashBackend in database user backend
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2024-07-08 16:30:52 +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
33b38c6573
fix: cs fix and psalm ci related changes
...
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
Hamza Mahjoubi
85a3b27cf9
Fix: Make out of office replacement nullable
...
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
2024-07-03 12:31:53 +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
John Molakvoæ
95dc7729fb
Merge pull request #40147 from summersab/refactor/OC-Server-getNotificationManager
2024-05-31 19:09:38 +07:00
John Molakvoæ
84789222b1
chore: php lint fix import
...
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-05-30 18:38:02 +07:00
John Molakvoæ
65ad1d0abe
Merge branch 'master' into refactor/OC-Server-getNotificationManager
...
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-05-30 14:33:12 +07:00
John Molakvoæ
cc7e6e5e4c
Merge branch 'master' into refactor/OC-Server-getCsrfTokenManager
...
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-05-30 14:29:21 +07:00
Daniel
fca38e12c8
Merge pull request #45411 from nextcloud/fix/auth/selective-token-activity-update
...
fix(auth): Update authtoken activity selectively
2024-05-29 12:05:45 +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
Christoph Wurst
bcc02a3c71
fix(auth): Update authtoken activity selectively
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-05-21 07:55:01 +07:00
yemkareems
7278198e6b
fix: delete user credentials stored in storages_credentials when user gets deleted
...
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-05-16 16:48:47 +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
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
Côme Chilliet
ec5133b739
fix: Apply new coding standard to all files
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Julius Härtl
e330efe5a0
fix: Implement option to temporarily set the user session
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-03-19 13:48:23 +07:00
John Molakvoæ
eb61f6b065
Merge pull request #40117 from summersab/refactor/OC-Server-getCommentsManager
2024-03-15 17:03:54 +07:00
John Molakvoæ
f5e3fea285
Merge pull request #40138 from summersab/refactor/OC-Server-getHasher
2024-03-15 15:08:32 +07:00
Andrew Summers
6910832170
Refactor `OC\Server::getCommentsManager`
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2024-03-15 13:14:06 +07:00
Andrew Summers
0047789580
Refactor `OC\Server::getTwoFactorAuthManager`
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2024-03-15 13:12:51 +07:00
Andrew Summers
f9ce6bfdff
Refactor `OC\Server::getHasher`
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2024-03-15 13:04:27 +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
Côme Chilliet
8bcc2d352e
chore: Fix missing template parameter for IEventListener
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-01-30 10:57:15 +07:00
Christoph Wurst
7f2fdd8843
fix(auth): Fix logging in with email, password and login name mismatch
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-01-19 19:29:41 +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
Côme Chilliet
eee9f1eec4
Always catch OCP versions of authentication exceptions
...
And always throw OC versions for BC
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-01-11 14:02:15 +07:00
Julius Härtl
6c52242fb1
Merge pull request #41927 from nextcloud/perf/login-with-email-token
2023-12-05 11:11:33 +07:00
Christoph Wurst
9a206c6282
fix(dav): Make current ooo info time-dependent
...
* If there is an out of office absence info and it happens now -> return
data
* Else: return no data
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-12-05 08:36:50 +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
Arthur Schiwon
bc1da2fa54
Merge pull request #40114 from summersab/refactor/OC-Server-getAvatarManager
...
Refactor `OC\Server::getAvatarManager`
2023-11-22 11:43:51 +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
Andy Scherzinger
1d9c482e68
Merge pull request #41302 from zero0cool0/master
...
Lower log level about invalid session token
2023-11-10 16:41:01 +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
Patrick Fischer
b2103556b5
Lower log level about invalid session token
2023-11-06 14:51:13 +07:00
Christoph Wurst
4f183bb604
fix(session): Log why session renewal failed
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-10-11 08:36:13 +07:00
Côme Chilliet
43971f6a5c
Merge pull request #39756 from nextcloud/enh/add-disabled-users-endpoint
...
Add endpoint for getting disabled user list
2023-10-10 13:33:49 +07:00
Christoph Wurst
f398d0b5a3
fix: Log critical session renewal and logout paths
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-10-09 13:21:10 +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
Christoph Wurst
83a30dfbdf
fix(user): Log affected user of app token login name mismatch
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-10-06 08:51:50 +07:00
Robin Appelman
ef87ff1848
Merge pull request #39216 from shdehnavi/replace_substr_calls_in_lib_private
...
Refactor "substr" calls in lib/private to improve code readability
2023-09-21 16:34:27 +07:00
Andrew Summers
2258058fd6
Refactor `OC\Server::getAvatarManager
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2023-09-01 16:43:04 +07:00
Andrew Summers
5dccf25e11
Refactor `OC\Server::getNotificationManager`
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2023-08-29 21:32:10 +07:00
Andrew Summers
1470a7294b
Refactor `OC\Server::getCsrfTokenManager`
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2023-08-29 21:28:51 +07:00
Joas Schilling
943f4c246f
Merge pull request #40079 from nextcloud/techdebt/noid/user-IThrottler-interface-for-DI
...
techdebt(DI): Use public IThrottler interface which exists since 25
2023-08-28 20:46:09 +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
daac5c9a95
fix(cache): Remove displayname cache entry on delete
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-28 14:59:54 +07:00
Joas Schilling
3962cd0aa8
fix!: Move getEventDispatcher usage to IEventDispatcher
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-28 14:11:22 +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
35c313e280
fix!: Remove User events which have a typed event replacement
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:54 +07:00
Hamid Dehnavi
d0b20534b9
Refactor "substr" calls to improve code readability
...
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-07-07 04:54:20 +07:00
Christoph Wurst
14719110b9
chore: Replace \OC::$server->query with \OCP\Server::get in /lib
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-07-06 15:21:22 +07:00
Côme Chilliet
b2f01b72fe
Merge pull request #34443 from nextcloud/feat/add-enabled-user-backend
...
Add IProvideEnabledStateBackend interface
2023-07-03 10:19:32 +07:00
Côme Chilliet
1603cdc8d2
Fix since annotations and add boolean return type for setUserEnabled
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-06-20 15:10:39 +07:00
Robin Appelman
9f1d497a0b
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_private
...
Refactors "strpos" calls in lib/private to improve code readability.
2023-06-01 23:10:00 +07:00
Joas Schilling
ef93bb926c
fix(dav): Fix avatar size in system address book
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-05-26 10:03:58 +07:00
Côme Chilliet
285c42ab14
Fix user tests, avoid setting enabled state to the same value
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-23 17:18:19 +07:00
Côme Chilliet
3af1ab2b2a
Add user enabled state backend feature
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-23 11:25:03 +07:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Christoph Wurst
1381c4c157
feat(users): Store and load a user's manager
...
Co-Authored-By: hamza221 <hamzamahjoubi221@gmail.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-05-12 13:56:48 +07:00
Christopher Ng
4ecae83385
fix(user): Can change display name
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-05-04 11:14:49 +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
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