aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2024-07-30 03:05:27 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2024-09-05 04:18:38 +0200
commit06443611479b6e3a4924bb6f571583af37f4c714 (patch)
tree72da643f804543eab5109752cbdd744e60df9232 /build
parent59b62aa50fd897efe0c381add6fee1b135b7d8a9 (diff)
downloadnextcloud-server-06443611479b6e3a4924bb6f571583af37f4c714.tar.gz
nextcloud-server-06443611479b6e3a4924bb6f571583af37f4c714.zip
fix: Fix unmodified placeholder replacing the actual value when updating
When updating global storages and user storages a property is not updated by "StoragesService::updateStorage()" if the value matches the unmodified placeholder. However, userglobal storages are not updated through the "StoragesService"; as only the authentication mechanism is updated it is directly done with "saveBackendOptions()" in "IUserProvided" or "UserGlobalAuth". Due to this the unmodified placeholder value needs to be explicitly checked in those cases and replaced by the actual value (note that in this case it is not possible to just skip updating a specific property). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/external-storage.feature32
1 files changed, 32 insertions, 0 deletions
diff --git a/build/integration/features/external-storage.feature b/build/integration/features/external-storage.feature
index d62c7a4f5c7..2b724be44b0 100644
--- a/build/integration/features/external-storage.feature
+++ b/build/integration/features/external-storage.feature
@@ -77,6 +77,22 @@ Feature: external-storage
Then fields of last external storage match with
| status | 0 |
+ Scenario: Save an external storage again with an unmodified password provided by user
+ Given Logging in using web as "admin"
+ And logged in user creates external global storage
+ | mountPoint | "ExternalStorageTest" |
+ | backend | "owncloud" |
+ | authMechanism | "password::userprovided" |
+ | backendOptions | {"host":"http://localhost:8080","secure":false} |
+ And fields of last external storage match with
+ | status | 2 |
+ And logged in user updates last external userglobal storage
+ | backendOptions | {"user":"admin","password":"admin"} |
+ When logged in user updates last external userglobal storage
+ | backendOptions | {"user":"admin","password":"__unmodified__"} |
+ Then fields of last external storage match with
+ | status | 0 |
+
Scenario: Save an external storage with global credentials provided by user
Given Logging in using web as "admin"
And logged in user creates external global storage
@@ -90,3 +106,19 @@ Feature: external-storage
| backendOptions | {"user":"admin","password":"admin"} |
Then fields of last external storage match with
| status | 0 |
+
+ Scenario: Save an external storage again with unmodified global credentials provided by user
+ Given Logging in using web as "admin"
+ And logged in user creates external global storage
+ | mountPoint | "ExternalStorageTest" |
+ | backend | "owncloud" |
+ | authMechanism | "password::global::user" |
+ | backendOptions | {"host":"http://localhost:8080","secure":false} |
+ And fields of last external storage match with
+ | status | 2 |
+ And logged in user updates last external userglobal storage
+ | backendOptions | {"user":"admin","password":"admin"} |
+ When logged in user updates last external userglobal storage
+ | backendOptions | {"user":"admin","password":"__unmodified__"} |
+ Then fields of last external storage match with
+ | status | 0 |