Daniel Calviño Sánchez
d2f1225b34
Fix deleting properties of user settings when not given explicitly
...
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>
2021-04-23 16:53:11 +02:00
Daniel Calviño Sánchez
3304d33e3b
Fix TypeError when "email" is not given in the controller request
...
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-23 16:53:11 +02:00
Daniel Calviño Sánchez
e30271be4f
Respect additional user settings not covered by the controller
...
"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>
2021-04-23 16:53:10 +02:00
Daniel Calviño Sánchez
c130b88004
Add more unit tests for setting user settings
...
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-23 16:53:09 +02:00
Daniel Calviño Sánchez
f2e40238a6
Change default test data to values less similar to empty values
...
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>
2021-04-23 16:53:08 +02:00
Daniel Calviño Sánchez
5a497841be
Extract default test data to a helper getter
...
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-23 16:53:07 +02:00
Daniel Calviño Sánchez
eaedf5fcd9
Use constants from interface rather than class
...
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-23 16:53:07 +02:00
Nextcloud bot
739504bd10
[tx-robot] updated from transifex
2021-04-23 02:26:44 +00:00
Nextcloud bot
f43c25dfe3
[tx-robot] updated from transifex
2021-04-22 02:26:53 +00:00
Nextcloud bot
e73034b95b
[tx-robot] updated from transifex
2021-04-21 02:26:35 +00:00
Nextcloud bot
16eed4a1ba
[tx-robot] updated from transifex
2021-04-20 02:26:29 +00:00
Nextcloud bot
69d60cbcaa
[tx-robot] updated from transifex
2021-04-19 02:26:35 +00:00
Nextcloud bot
e5b67bfdb7
[tx-robot] updated from transifex
2021-04-17 02:24:35 +00:00
Nextcloud bot
09a5cb1495
[tx-robot] updated from transifex
2021-04-16 02:26:22 +00:00
Nextcloud bot
46686de607
[tx-robot] updated from transifex
2021-04-15 02:25:40 +00:00
Nextcloud bot
f988edd5f7
[tx-robot] updated from transifex
2021-04-14 02:27:20 +00:00
Nextcloud bot
cd76cc773d
[tx-robot] updated from transifex
2021-04-13 02:25:25 +00:00
Nextcloud bot
3e8bf30005
[tx-robot] updated from transifex
2021-04-12 02:25:25 +00:00
Nextcloud bot
2843b84b43
[tx-robot] updated from transifex
2021-04-09 02:25:36 +00:00
Nextcloud bot
26dea5d023
[tx-robot] updated from transifex
2021-04-08 02:24:31 +00:00
Nextcloud bot
f29f06febd
[tx-robot] updated from transifex
2021-04-07 02:24:43 +00:00
Nextcloud bot
6cbf84784a
[tx-robot] updated from transifex
2021-04-06 02:25:58 +00:00
Nextcloud bot
c516405fe1
[tx-robot] updated from transifex
2021-04-05 02:25:12 +00:00
Nextcloud bot
9b6cf09a8e
[tx-robot] updated from transifex
2021-04-04 02:25:14 +00:00
Nextcloud bot
c9c3631428
[tx-robot] updated from transifex
2021-04-03 02:44:03 +00:00
Nextcloud bot
d702c66a9d
[tx-robot] updated from transifex
2021-04-02 02:26:32 +00:00
Nextcloud bot
bfe4a84ca7
[tx-robot] updated from transifex
2021-04-01 02:25:09 +00:00
Nextcloud bot
e929afd4e8
[tx-robot] updated from transifex
2021-03-31 02:25:18 +00:00
Nextcloud bot
acafb8838d
[tx-robot] updated from transifex
2021-03-30 02:24:48 +00:00
Nextcloud bot
9bfbf3ff7c
[tx-robot] updated from transifex
2021-03-29 02:24:26 +00:00
Nextcloud bot
2a7a9b80a0
[tx-robot] updated from transifex
2021-03-28 02:24:31 +00:00
Nextcloud bot
79a5ba1992
[tx-robot] updated from transifex
2021-03-26 02:26:01 +00:00
Nextcloud bot
7ae4b6b0aa
[tx-robot] updated from transifex
2021-03-25 02:26:05 +00:00
Nextcloud bot
eeea77112e
[tx-robot] updated from transifex
2021-03-24 02:25:33 +00:00
Nextcloud bot
bc5e51af7e
[tx-robot] updated from transifex
2021-03-23 02:24:33 +00:00
Nextcloud bot
6365e59aa9
[tx-robot] updated from transifex
2021-03-22 02:24:13 +00:00
Nextcloud bot
a4d6201d7e
[tx-robot] updated from transifex
2021-03-20 02:24:08 +00:00
Nextcloud bot
8670ef707f
[tx-robot] updated from transifex
2021-03-19 02:25:21 +00:00
Nextcloud bot
709788e08f
[tx-robot] updated from transifex
2021-03-17 02:24:47 +00:00
Nextcloud bot
95b55423e8
[tx-robot] updated from transifex
2021-03-16 02:25:09 +00:00
Nextcloud bot
901472a899
[tx-robot] updated from transifex
2021-03-15 02:24:26 +00:00
Nextcloud bot
bbb616a604
[tx-robot] updated from transifex
2021-03-14 02:24:05 +00:00
Nextcloud bot
2a955bf864
[tx-robot] updated from transifex
2021-03-13 02:23:21 +00:00
Nextcloud bot
54affce466
[tx-robot] updated from transifex
2021-03-12 02:23:09 +00:00
Nextcloud bot
c750417f19
[tx-robot] updated from transifex
2021-03-11 02:23:35 +00:00
Nextcloud bot
efcc3dd99f
[tx-robot] updated from transifex
2021-03-10 02:23:25 +00:00
Nextcloud bot
6db532444f
[tx-robot] updated from transifex
2021-03-09 02:24:20 +00:00
Nextcloud bot
3bf923ec55
[tx-robot] updated from transifex
2021-03-06 02:22:48 +00:00
Nextcloud bot
18ba1854db
[tx-robot] updated from transifex
2021-03-04 02:22:39 +00:00
Nextcloud bot
7d5f7cef93
[tx-robot] updated from transifex
2021-03-03 02:21:51 +00:00