Only don't resolve public links

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2016-12-20 08:52:31 +01:00
parent 5983c68462
commit e9727440dd
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 3 additions and 4 deletions

View File

@ -1053,12 +1053,11 @@ class Manager implements IManager {
* @throws ShareNotFound * @throws ShareNotFound
*/ */
public function getShareByToken($token) { public function getShareByToken($token) {
$share = null;
try {
if(!$this->shareApiAllowLinks()) { if(!$this->shareApiAllowLinks()) {
throw new ShareNotFound(); throw new ShareNotFound();
} }
$share = null;
try {
$provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_LINK); $provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_LINK);
$share = $provider->getShareByToken($token); $share = $provider->getShareByToken($token);
} catch (ProviderException $e) { } catch (ProviderException $e) {