diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-03-21 14:35:41 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-03-21 14:35:41 +0100 |
commit | 8ab70b123109a75621b75a3075cc61ea9898df54 (patch) | |
tree | e0c363c5324e7c1d73aff74b32cb91e55df3f267 /apps/files_external/lib | |
parent | 86581f66265be0dddb97f67ac867a5cb92d335e0 (diff) | |
download | nextcloud-server-8ab70b123109a75621b75a3075cc61ea9898df54.tar.gz nextcloud-server-8ab70b123109a75621b75a3075cc61ea9898df54.zip |
properly use smb permissions
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/smb.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index 25acae95fa3..08c4b25a088 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -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 */ |