aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/tests/Controller/UsersControllerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-06-031-27/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* feat(ldap): sync additional properties to profile and SABJake Nabasny2024-05-301-1/+6
| | | | | | | | | | | | | | | Synced from LDAP to profile: - Date of birth Synced from LDAP to SAB (via the profile): - Biography - Date of birth Original code by Jake Nabasny (GitHub: @slapcat) Co-authored-by: Jake Nabasny <jake@nabasny.com> Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud> Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* Merge branch 'master' into fix/42480/user-admin-not-adminJohn Molakvoæ2024-02-241-18/+16
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * fix(settings): Use initial state instead of custom state for server dataFerdinand Thiessen2024-02-231-18/+16
| | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | fix(admin role): fix old and wrong way to determine whether user is adminArthur Schiwon2024-02-191-2/+4
|/ | | | | | | | | - fixes Settings knowing who is an admin of non-local group backend groups - obsoletes and removes a little old, deprecated code - double checks proper parameter type on Group\Manager::isAdmin - also fixes legacy OC_User code to check whether user is an admin Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-5/+5
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Migrate applications away from deprecated ILoggerCôme Chilliet2023-09-211-3/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix typing errors in settings testsCôme Chilliet2023-01-021-6/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add unit test for case insensitive email savingVincent Petry2022-12-161-1/+9
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix testsCarl Schwan2022-11-221-4/+29
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* use specific email getter where necessaryArthur Schiwon2021-09-091-5/+4
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-3/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* do not use private AccountManager in UsersControllerArthur Schiwon2021-05-251-151/+251
| | | | | | | | - extends IAccountProperty for verificationData getters and setters - implementation thereof ^ - and of course adaption of UsersController Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix deleting properties of user settings when not given explicitlyDaniel Calviño Sánchez2021-04-231-0/+120
| | | | | | | | | | The controller can receive an optional subset of the properties of the user settings; values not given are set to "null" by default. However, those null values overwrote the previously existing values, so in practice any value not given was deleted from the user settings. Now only non null values overwrite the previous values. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Respect additional user settings not covered by the controllerDaniel Calviño Sánchez2021-04-231-10/+0
| | | | | | | | | | | | | | | | | | | | "AccountManager::updateUser()" wipes previous user data with whichever user data is given (except for some adjustments, like resetting the verified status when needed). As the controller overrode the properties those properties would lose some of their attributes even if they are not affected by the changes made by the controller. Now the controller only modifies the attributes set ("value" and "scope") to prevent that. Note that with this change the controller no longer removes the "verified" status, but this is not a problem because, as mentioned, "AccountManager::updateUser()" resets them when needed (for example, when the value of the website property changes). This change is a previous step to fix overwritting properties with null values, and it will prevent the controller from making unexpected changes if more attributes are added in the future. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add more unit tests for setting user settingsDaniel Calviño Sánchez2021-04-231-0/+160
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Change default test data to values less similar to empty valuesDaniel Calviño Sánchez2021-04-231-12/+12
| | | | | | | Right now it makes no difference, but this should make future tests clearer, specially in case of failure. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Extract default test data to a helper getterDaniel Calviño Sánchez2021-04-231-42/+46
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Use constants from interface rather than classDaniel Calviño Sánchez2021-04-231-19/+19
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Make extra user profile fields always editableVincent Petry2021-03-261-0/+1
| | | | | | | | The fields for phone number, address, website and twitter are now editable regardless whether federated sharing and the lookup server are enabled or not. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Map old account scope properties to new namesVincent Petry2021-03-261-14/+14
| | | | | | | | Use new scope values in settings page. Adjust all consumers to use the new constants. Map old scope values to new ones in account property getter. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Also clear the knownUser when changing via the settings endpointJoas Schilling2021-03-101-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Also translate the phone number when coming in via the accounts manager API ↵Joas Schilling2020-12-071-3/+5
| | | | | | directly Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make code strictJoas Schilling2020-12-071-45/+46
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* emit typed event for user managementArthur Schiwon2020-09-081-3/+8
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-18/+18
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-9/+9
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-4/+20
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move settings to an appChristoph Wurst2019-09-281-0/+552
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>