|
@@ 363-368 (lines=6) @@
|
| 360 |
|
throw new \Exception($message_t); |
| 361 |
|
} |
| 362 |
|
// verify that the user has share permission |
| 363 |
|
if (!\OC\Files\Filesystem::isSharable($path) || \OCP\Util::isSharingDisabledForUser()) { |
| 364 |
|
$message = 'You are not allowed to share %s'; |
| 365 |
|
$message_t = $l->t('You are not allowed to share %s', [$path]); |
| 366 |
|
\OCP\Util::writeLog('OCP\Share', sprintf($message, $path), \OCP\Util::DEBUG); |
| 367 |
|
throw new \Exception($message_t); |
| 368 |
|
} |
| 369 |
|
} |
| 370 |
|
|
| 371 |
|
//verify that we don't share a folder which already contains a share mount point |
|
@@ 849-854 (lines=6) @@
|
| 846 |
|
$class = self::$backendTypes[$itemType]['class']; |
| 847 |
|
if (class_exists($class)) { |
| 848 |
|
self::$backends[$itemType] = new $class; |
| 849 |
|
if (!(self::$backends[$itemType] instanceof \OCP\Share_Backend)) { |
| 850 |
|
$message = 'Sharing backend %s must implement the interface OCP\Share_Backend'; |
| 851 |
|
$message_t = $l->t('Sharing backend %s must implement the interface OCP\Share_Backend', array($class)); |
| 852 |
|
\OCP\Util::writeLog('OCP\Share', sprintf($message, $class), \OCP\Util::ERROR); |
| 853 |
|
throw new \Exception($message_t); |
| 854 |
|
} |
| 855 |
|
return self::$backends[$itemType]; |
| 856 |
|
} else { |
| 857 |
|
$message = 'Sharing backend %s not found'; |