find and show share-by mail links
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
561dd80d57
commit
1e930df91f
|
@ -32,6 +32,7 @@ use OCP\IUserManager;
|
|||
use OCP\Mail\IMailer;
|
||||
use OCP\Security\ISecureRandom;
|
||||
use OC\Share20\Share;
|
||||
use OCP\Share\Exceptions\ShareNotFound;
|
||||
use OCP\Share\IShare;
|
||||
use OCP\Share\IShareProvider;
|
||||
|
||||
|
|
|
@ -1049,6 +1049,16 @@ class Manager implements IManager {
|
|||
// If it is not a link share try to fetch a federated share by token
|
||||
if ($share === null) {
|
||||
$provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_REMOTE);
|
||||
try {
|
||||
$share = $provider->getShareByToken($token);
|
||||
} catch (ShareNotFound $e) {
|
||||
$share = null;
|
||||
}
|
||||
}
|
||||
|
||||
// If it is not a link share try to fetch a federated share by token
|
||||
if ($share === null && $this->shareProviderExists(\OCP\Share::SHARE_TYPE_EMAIL)) {
|
||||
$provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_EMAIL);
|
||||
$share = $provider->getShareByToken($token);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue