summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-01-05 13:29:56 +0100
committerVincent Petry <pvince81@owncloud.com>2016-01-08 11:54:32 +0100
commit68bd003e4b7ae50275515b015c8198f29becd2cb (patch)
tree56ccaf8bca5c4657f6cef81106bc4272385137a6 /apps/files_external
parent8da3c3f125ba6d741b7c83505149e75faa5e2f94 (diff)
downloadnextcloud-server-68bd003e4b7ae50275515b015c8198f29becd2cb.tar.gz
nextcloud-server-68bd003e4b7ae50275515b015c8198f29becd2cb.zip
correctly set applicables when updating user storage
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/service/userstoragesservice.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/files_external/service/userstoragesservice.php b/apps/files_external/service/userstoragesservice.php
index 95dc102aa96..9b622f9b470 100644
--- a/apps/files_external/service/userstoragesservice.php
+++ b/apps/files_external/service/userstoragesservice.php
@@ -110,6 +110,19 @@ class UserStoragesService extends StoragesService {
}
/**
+ * Update storage to the configuration
+ *
+ * @param StorageConfig $updatedStorage storage attributes
+ *
+ * @return StorageConfig storage config
+ * @throws NotFoundException if the given storage does not exist in the config
+ */
+ public function updateStorage(StorageConfig $updatedStorage) {
+ $updatedStorage->setApplicableUsers([$this->getUser()->getUID()]);
+ return parent::updateStorage($updatedStorage);
+ }
+
+ /**
* Get the visibility type for this controller, used in validation
*
* @return string BackendService::VISIBILITY_* constants