Return the token as well

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-03-28 10:51:44 +02:00 committed by Roeland Jago Douma
parent cf7c320949
commit 4bcb7d88b5
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 3 additions and 2 deletions

View File

@ -983,7 +983,7 @@ class FederatedShareProvider implements IShareProvider {
}
$qb = $this->dbConnection->getQueryBuilder();
$qb->select('share_with', 'file_source', 'file_target')
$qb->select('share_with', 'token', 'file_source', 'file_target')
->from('share')
->where($qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_REMOTE)))
->andWhere($qb->expr()->in('file_source', $qb->createNamedParameter($ids, IQueryBuilder::PARAM_INT_ARRAY)))
@ -998,6 +998,7 @@ class FederatedShareProvider implements IShareProvider {
$remote[$row['share_with']] = [
'node_id' => $row['file_source'],
'node_path' => $row['file_target'],
'token' => $row['token'],
];
}
$cursor->closeCursor();

View File

@ -94,7 +94,7 @@ class File implements \OCP\Encryption\IFile {
$resultForParents = $this->shareManager->getAccessList($parentNode);
$this->cache[$parent] = $resultForParents;
}
$userIds = \array_merge($userIds, $resultForParents['users']);
$userIds = array_merge($userIds, $resultForParents['users']);
$public = $resultForParents['public'] || !empty($resultForParents['remote']);