return $this->localSystemAddressBook;
}
+ /**
+ * @return void
+ */
public function syncInstance(?\Closure $progressCallback = null) {
$systemAddressBook = $this->getLocalSystemAddressBook();
$this->userManager->callForAllUsers(function ($user) use ($systemAddressBook, $progressCallback) {
use Exception;
class FileLocked extends \Sabre\DAV\Exception {
+ /**
+ * @param string $message
+ * @param int $code
+ */
public function __construct($message = "", $code = 0, ?Exception $previous = null) {
if ($previous instanceof \OCP\Files\LockNotAcquiredException) {
$message = sprintf('Target file %s is locked by another process.', $previous->path);
/**
* @param string $filePath
- * @param \Sabre\DAV\INode $node
+ * @param ?\Sabre\DAV\INode $node
+ * @return void
* @throws \Sabre\DAV\Exception\BadRequest
*/
public function sendFileIdHeader($filePath, ?\Sabre\DAV\INode $node = null) {
}
}
+ /**
+ * @return void
+ */
public function firstLogin(?IUser $user = null) {
if (!is_null($user)) {
$principal = 'principals/users/' . $user->getUID();
]);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
if ($storage->getType() === StorageConfig::MOUNT_TYPE_ADMIN) {
$uid = '';
return $credentials;
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
if (!isset($user)) {
throw new InsufficientDataForMeaningfulAnswerException('No login credentials saved');
->addParameters([]);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
try {
$credentials = $this->credentialsStore->getLoginCredentials();
$this->credentialsManager->store($user->getUID(), self::CREDENTIALS_IDENTIFIER, $credentials);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
if ($user === null) {
throw new InsufficientDataForMeaningfulAnswerException('No credentials saved');
]);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
if (!isset($user)) {
throw new InsufficientDataForMeaningfulAnswerException('No credentials saved');
;
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$auth = new RSACrypt();
$auth->setPassword($this->config->getSystemValue('secret', ''));
]);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$auth = new RSACrypt();
$auth->setPassword($this->config->getSystemValue('secret', ''));
return $this->invalidId;
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$storage->setBackendOption('exception', new \Exception('Unknown storage backend "' . $this->invalidId . '"', StorageNotAvailableException::STATUS_ERROR));
}
->setLegacyAuthMechanism($legacyAuth);
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$auth = $storage->getAuthMechanism();
if ($auth->getScheme() === AuthMechanism::SCHEME_PASSWORD) {
;
}
+ /**
+ * @return void
+ */
public function manipulateStorageConfig(StorageConfig &$storage, ?IUser $user = null) {
$username_as_share = ($storage->getBackendOption('username_as_share') === true);
*
* @param StorageConfig $storage
* @param IUser $user User the storage is being used as
+ * @return void
* @throws InsufficientDataForMeaningfulAnswerException
* @throws StorageNotAvailableException
*/