arrayCache = $arrayCache;
$this->manager = $manager;
$this->logger = $logger;
}
/**
* Wraps the given storage when it is not a shared storage
*
* @param string $mountPoint
* @param IStorage $storage
* @param IMountPoint $mount
* @param bool $force apply the wrapper even if the storage normally has encryption disabled, helpful for repair steps
* @return Encryption|IStorage
*/
public function wrapStorage(string $mountPoint, IStorage $storage, IMountPoint $mount, bool $force = false) {
$parameters = [
'storage' => $storage,
'mountPoint' => $mountPoint,
'mount' => $mount
];
if ($force || (!$storage->instanceOfStorage(IDisableEncryptionStorage::class) && $mountPoint !== '/')) {
$user = \OC::$server->getUserSession()->getUser();
$mountManager = Filesystem::getMountManager();
$uid = $user ? $user->getUID() : null;
$fileHelper = \OC::$server->get(IFile::class);
$keyStorage = \OC::$server->get(EncryptionKeysStorage::class);
$util = new Util(
new View(),
\OC::$server->getUserManager(),
\OC::$server->getGroupManager(),
\OC::$server->getConfig()
);
$update = new Update(
new View(),
$util,
Filesystem::getMountManager(),
$this->manager,
$fileHelper,
$this->logger,
$uid
);
return new Encryption(
$parameters,
$this->manager,
$util,
$this->logger,
$fileHelper,
$uid,
$keyStorage,
$update,
$mountManager,
$this->arrayCache
);
} else {
return $storage;
}
}
}
_PDFLinearization'>Temp_PDFLinearization
Apache XML Graphics FOP: https://github.com/apache/xmlgraphics-fop | www-data |
blob: ae57bbd778acde65f55aa720cecff1087cf89b91 (
plain)