Skip to content
Snippets Groups Projects
Commit 174805f5 authored by Robin Appelman's avatar Robin Appelman
Browse files

Merge pull request #9762 from owncloud/owner-public

Return the proper owner for home storages
parents e18b0fca a8532aa2
No related branches found
No related tags found
No related merge requests found
......@@ -66,4 +66,14 @@ class Home extends Local implements \OCP\Files\IHomeStorage {
public function getUser() {
return $this->user;
}
/**
* get the owner of a path
*
* @param string $path The path to get the owner
* @return string uid or false
*/
public function getOwner($path) {
return $this->user->getUID();
}
}
......@@ -53,6 +53,8 @@ class Home extends Storage {
*/
private $tmpDir;
private $userId;
/**
* @var \OC\User\User $user
*/
......@@ -97,4 +99,8 @@ class Home extends Storage {
public function testGetCacheReturnsHomeCache() {
$this->assertInstanceOf('\OC\Files\Cache\HomeCache', $this->instance->getCache());
}
public function testGetOwner() {
$this->assertEquals($this->userId, $this->instance->getOwner(''));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment