diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-11-29 13:55:34 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-12-03 17:51:00 +0300 |
commit | 811bd209b3165d0b9a57d30f18271e565a9d1a3d (patch) | |
tree | ee1362ac5b3464161f58f95c77891d9bb349c00e /lib/Files | |
parent | 3e93df059169b9f0a2d3f791eb2c2d94e35e0c25 (diff) |
Do not show the Talk sidebar in Files app for shared folders
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/Files')
-rw-r--r-- | lib/Files/Util.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Files/Util.php b/lib/Files/Util.php index c0890f8af..a6fd32855 100644 --- a/lib/Files/Util.php +++ b/lib/Files/Util.php @@ -78,6 +78,8 @@ class Util { * the file through a user, group, circle or room share (but not through a * public link, for example), or if she is the owner of such a share. * + * Only files are taken into account; folders are ignored. + * * @param string $fileId * @param string $userId * @return IShare|null @@ -102,11 +104,17 @@ class Util { /** * Returns any share of the node that the user has direct access to. * + * Only files are taken into account; folders are ignored. + * * @param Node $node * @param string $userId * @return IShare|null */ private function getAnyDirectShareOfNodeAccessibleByUser(Node $node, string $userId) { + if ($node->getType() === \OCP\Files\FileInfo::TYPE_FOLDER) { + return null; + } + $reshares = false; $limit = 1; |