Commit Graph

278 Commits

Author SHA1 Message Date
Louis Chemineau
8a2cf5bb68 Do not dispatch postSetPassword when setPassword fails
Also Improve error message when setPassword fails

Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-05-05 17:21:23 +02:00
Vincent Petry
ff385dc679 Merge pull request #32082 from nextcloud/directory-content-lazy-owner
use a lazy user for the file owner when listing a directory
2022-04-25 11:44:44 +02:00
Robin Appelman
7a6c724a81 Use a lazy user for the file owner when listing a directory
Only getUID and getDisplayName are called on the file owner objects anyway
and we can get this information often without DB request

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 17:02:37 +02:00
Robin Appelman
674c0bec2c cache display names in local memory before external memcache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 13:02:30 +02:00
Carl Schwan
ed4c1e584f Update cache when display name change
This improve the correctness of the data

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-22 10:29:18 +02:00
Carl Schwan
4333c215cb Cache display name
This should saves some query in the share backend when displaying the
owner and it's not important if the display name is 10 minutes outdated
as it is very rare that this gets changed.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-22 10:22:15 +02:00
Côme Chilliet
6be7aa112f Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +01:00
Joas Schilling
18bafefb00 Merge pull request #31218 from nextcloud/techdebt/noid/use-cache-also-for-userbackend-getpassword
Use the cache also for UserBackend::getPassword
2022-03-02 11:41:32 +01:00
Joas Schilling
b90e657ac7 Delay loading user preferences until we need them
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-28 13:49:12 +01:00
Joas Schilling
86de1d569f Only setupFS when we have to copy the skeleton
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-25 15:55:06 +01:00
Joas Schilling
25caf4a42c Update cache when setting the password
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-18 09:47:18 +01:00
Joas Schilling
23ef02fbe2 Use the cache also for UserBackend::getPassword
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-16 18:00:47 +01:00
Marek-Wojtowicz
f76a915096 Update Session.php
The http headers according to rfc 2616 is iso-8859-1. This patch fixes the behavior when non-ascii characters are present in the header.

Signed-off-by: Marek Wójtowicz <Marek.Wojtowicz@agh.edu.pl>
2022-01-12 23:07:28 +01:00
Joas Schilling
78e90b69ba Don't check the configvalue for lastLogin which is never null
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-10 16:26:13 +01:00
Joas Schilling
c0ba89ecc9 Remove default token which is deprecated since Nextcloud 13
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 18:41:31 +01:00
Côme Chilliet
008b79d808 Fix type errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:58 +01:00
Joas Schilling
ccfaddf781 Fix missing token update
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-12 14:43:23 +01:00
Joas Schilling
b578a1e8b5 Fair use of push notifications
We want to keep offering our push notification service for free, but large
users overload our infrastructure. For this reason we have to rate-limit the
use of push notifications. If you need this feature, consider setting up your
own push server or using Nextcloud Enterprise.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-23 00:54:50 +02:00
Joas Schilling
1b8ebf2cf1 Use cached user backend info for password login
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-09-14 08:40:19 +02:00
Arthur Schiwon
4461b9e870 enable the user to set a primary (notification) email address (backend)
- specific getters and setters on IUser and implementation
- new notify_email field in provisioning API

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-09 19:23:04 +02:00
Julius Härtl
95987d903d Merge pull request #28481 from nextcloud/fix/hash-key
Hash cache key
2021-08-18 15:18:58 +02:00
Christopher Ng
60ecc432a4 Hash cache key
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-08-17 21:55:01 +00:00
Christoph Wurst
a143337791 Emit an error log when the app token login name does not match
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-08-13 10:31:51 +02:00
Julien Veyssier
416d10f76c refs #21045 add app config to disable unlimited quota and to set max quota
avoid unlimited quota as default_quota fallback value if unlimited quota is not allowed
avoid getting/setting/displaying unlimited default quota if not allowed
implement tests for unlimited quota restrictions

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
2021-07-29 19:31:36 +00:00
Julius Härtl
f43c2b45d8 Directly return cloud id from user
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-14 09:52:15 +02:00
Gary Kim
b78f3a57d1 Migrate HintException to OCP
Signed-off-by: Gary Kim <gary@garykim.dev>
2021-06-30 15:28:02 -04:00
John Molakvoæ (skjnldsv)
215aef3cbd Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
John Molakvoæ
d0cf20cc51 Merge pull request #26792 from nextcloud/user-delete-cleanup-files
better cleanup of user files on user deletion
2021-06-02 17:02:00 +02:00
Robin Appelman
ed2d02d5f1 better cleanup of user files on user deletion
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-04-27 20:29:51 +02:00
Joas Schilling
521bb30541 Throw "401 Unauthenticated" when authentication is provided but invalid
E.g. with an AppToken that has been revoked

Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-22 15:28:43 +02:00
Joas Schilling
0d46fafd41 Merge pull request #26161 from nextcloud/bugfix/noid/improve-matching-of-phonebook-searches
Improve search results when only phonebook-matches can we autocompleted
2021-03-17 15:22:03 +01:00
Joas Schilling
3379e69ecc Fix parameter types in docs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-17 09:51:31 +01:00
Joas Schilling
9a189bc710 Improve search results when only phonebook-matches can we autocompleted
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-17 09:51:31 +01:00
Robin Appelman
dd477d30f9 dont allow creating users with __groupfolders as uid
Fixes https://github.com/nextcloud/groupfolders/issues/338

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-16 19:03:10 +01:00
Roeland Jago Douma
618805b14f Fix RedundantPropertyInitializationCheck
For #25839

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-09 09:49:45 +01:00
Lionel Elie Mamane
f99f463834 token login: emit preLogin event with LoginName
to bring it in line with normal (non-token) login.

Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
2021-02-19 22:27:46 +01:00
Joas Schilling
645f83121e Cache the user backend info for 300s
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-02-15 10:36:08 +01:00
Christoph Wurst
81302f78e5 Merge pull request #24948 from nextcloud/dependabot/composer/doctrine/dbal-3.0.0
Bump doctrine/dbal from 2.12.0 to 3.0.0
2021-01-08 14:58:43 +01:00
Christoph Wurst
8b64e92b92 Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +01:00
Robin Appelman
c374bbf14d allow authenticating using urlencoded passwords
this allows authenticating with passwords that contain non ascii-characters in contexts that otherwise do not allow it (http basic)

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-07 10:43:43 +01:00
Christoph Wurst
d89a75be0b Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Morris Jobke
5cc348ae72 Fix typo
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-04 12:51:45 +01:00
Roeland Jago Douma
48b4b83b5a Remember me is not an app_password
While technically they are stored the same. This session variable is
used to indicate that a user is using an app password to authenticate.
Like from a client. Or when having it generated automatically.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-04 12:40:28 +01:00
Morris Jobke
d87705a894 Allow subscription to indicate that a userlimit is reached
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-02 15:20:03 +01:00
Morris Jobke
9bf76d2bad Streamline user creation and deletion events
CreateUserEvent was the only one that didn't matched the naming scheme of BeforePASTTENSEEvent and PASTTENSEEvent. The event wasn't used at all so this just removes it again as there is BeforeUserCreatedEvent that is also available since 18.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-23 23:59:52 +01:00
Roeland Jago Douma
e93823cba0 Bearer must be in the start of the auth header
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-06 08:32:50 +01:00
Morris Jobke
fd3d7c394a Deprecate old user manager events for user creation
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-04 21:19:16 +01:00
Christoph Wurst
7e72866811 Type the \OCP\IUserManager::callForSeenUsers closure with Psalm
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-28 19:21:00 +01:00
Christoph Wurst
d9015a8c94 Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Robin Appelman
674db6da88 add event to allow apps to overwrite user quota
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-17 16:32:48 +02:00