diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-10 18:48:29 +0300 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-10 19:05:57 +0300 |
commit | 9651defe3f6358b7a880fbf9a815b146009170a5 (patch) | |
tree | dae61c916da4e381ba27679de329ba541fa2975d | |
parent | 1301ec93519a39fa88c2eca1e679b20dbb560975 (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.php | 6 |
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; |