Merge pull request #23447 from owncloud/smb-permissions-9
[9.0] properly use smb permissions
This commit is contained in:
commit
49b5b1b08c
|
@ -323,6 +323,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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue