Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-10 18:48:29 +0300
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-10 19:05:57 +0300
commit9651defe3f6358b7a880fbf9a815b146009170a5 (patch)
treedae61c916da4e381ba27679de329ba541fa2975d
parent1301ec93519a39fa88c2eca1e679b20dbb560975 (diff)
Also filter the old share info endpoint
Make sure we do not show an icon if we can't display a share
-rw-r--r--lib/private/share/share.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index b09adf1aa99..149dd082bbc 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -2495,7 +2495,8 @@ class Share extends Constants {
if ($fileDependent) {
$select = '`*PREFIX*share`.`id`, `*PREFIX*share`.`parent`, `share_type`, `path`, `storage`, '
. '`share_with`, `uid_owner` , `file_source`, `stime`, `*PREFIX*share`.`permissions`, '
- . '`*PREFIX*storages`.`id` AS `storage_id`, `*PREFIX*filecache`.`parent` as `file_parent`';
+ . '`*PREFIX*storages`.`id` AS `storage_id`, `*PREFIX*filecache`.`parent` as `file_parent`, '
+ . '`uid_initiator`';
} else {
$select = '`id`, `parent`, `share_type`, `share_with`, `uid_owner`, `item_source`, `stime`, `*PREFIX*share`.`permissions`';
}
@@ -2583,6 +2584,9 @@ class Share extends Constants {
$statuses = array();
foreach ($items as $item) {
if ($item['share_type'] === self::SHARE_TYPE_LINK) {
+ if ($item['uid_initiator'] !== \OC::$server->getUserSession()->getUser()->getUID()) {
+ continue;
+ }
$statuses[$item[$column]]['link'] = true;
} else if (!isset($statuses[$item[$column]])) {
$statuses[$item[$column]]['link'] = false;