diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-10 16:48:29 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-10 17:05:57 +0100 |
commit | 9651defe3f6358b7a880fbf9a815b146009170a5 (patch) | |
tree | dae61c916da4e381ba27679de329ba541fa2975d /lib/private/share/share.php | |
parent | 1301ec93519a39fa88c2eca1e679b20dbb560975 (diff) | |
download | nextcloud-server-9651defe3f6358b7a880fbf9a815b146009170a5.tar.gz nextcloud-server-9651defe3f6358b7a880fbf9a815b146009170a5.zip |
Also filter the old share info endpoint
Make sure we do not show an icon if we can't display a share
Diffstat (limited to 'lib/private/share/share.php')
-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; |