summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-11-18 17:08:02 +0100
committerRobin Appelman <icewind@owncloud.com>2015-11-18 17:08:02 +0100
commit1d82d93baa127e951790003b0634af8841dceb0d (patch)
tree9d36012f0d987be01f887dd7cab94d974a308a33 /apps/files_sharing/lib
parent90bd53c94e6d52e2e79869f105651a5dcee8a3e6 (diff)
downloadnextcloud-server-1d82d93baa127e951790003b0634af8841dceb0d.tar.gz
nextcloud-server-1d82d93baa127e951790003b0634af8841dceb0d.zip
Implement getOwner for external share storage
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/external/storage.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 270d8b6d1b8..2a0d827e064 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -250,7 +250,7 @@ class Storage extends DAV implements ISharedStorage {
$response = $client->post($url, ['body' => ['password' => $password]]);
} catch (\GuzzleHttp\Exception\RequestException $e) {
if ($e->getCode() === 401 || $e->getCode() === 403) {
- throw new ForbiddenException();
+ throw new ForbiddenException();
}
// throw this to be on the safe side: the share will still be visible
// in the UI in case the failure is intermittent, and the user will
@@ -260,4 +260,9 @@ class Storage extends DAV implements ISharedStorage {
return json_decode($response->getBody(), true);
}
+
+ public function getOwner($path) {
+ list(, $remote) = explode('://', $this->remote, 2);
+ return $this->remoteUser . '@' . $remote;
+ }
}