Commit Graph

362 Commits (7620d230df8756a9c439c4acbd756fbeae9345f7)

Author SHA1 Message Date
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
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
Côme Chilliet 426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +07:00
Julius Härtl c7c1133c15
Merge pull request #35561 from nextcloud/create-user-transaction 2023-03-15 15:13:50 +07:00
Arthur Schiwon a30d7c51d3
Merge pull request #37227 from nextcloud/h1-dav-brute-force-protection
chore: use local variable for remote address
2023-03-15 15:11:53 +07:00
Thomas Citharel f7e65b1751 Create the database user in a transaction
In OC\User\Manager::createUserFromBackend the newly created user is read
using getUserObject($uid, $backend) but that can cause causal read
issues (wrote in DB primary, not yet in secondary).

In OC\User\Database user backend the user cache is unset after the
insert, so it can't be used by getRealUID() (which is called by
getUserObject()).

To avoid that we make sure the user cache is repopulated in a
transaction.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-03-15 11:07:07 +07:00
Daniel Kesselberg f751d2d891
chore: use local variable for remote address
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-03-10 18:04:34 +07:00
Julius Härtl 3287eddbbc fix: Recalculate storage statistics on updating the quota
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-06 22:46:07 +07:00
Robin Appelman 853ec60f3e also cache backend for user in memory instead of always going to redis
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-10 12:25:23 +07:00