Skip to content
Snippets Groups Projects
Commit 2357bbf8 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #23439 from owncloud/smb-permissions

properly use smb permissions
parents 2db67c33 8ab70b12
No related branches found
No related tags found
No related merge requests found
......@@ -349,6 +349,28 @@ class SMB extends Common {
}
}
public function isReadable($path) {
try {
$info = $this->getFileInfo($path);
return !$info->isHidden();
} catch (NotFoundException $e) {
return false;
} catch (ForbiddenException $e) {
return false;
}
}
public function isUpdatable($path) {
try {
$info = $this->getFileInfo($path);
return !$info->isHidden() && !$info->isReadOnly();
} catch (NotFoundException $e) {
return false;
} catch (ForbiddenException $e) {
return false;
}
}
/**
* check if smbclient is installed
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment