mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
chore(encryption): Remove unused attribute $uid in KeyManager::getFileKey
It’s a private API in the application, no need to keep an unused attribute. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com> [skip ci]
This commit is contained in:
parent
ca4dfe5575
commit
d58f82cde3
5 changed files with 5 additions and 5 deletions
|
|
@ -85,7 +85,7 @@ class DropLegacyFileKey extends Command {
|
|||
$output->writeln('<error>' . $path . ' does not have a proper header</error>');
|
||||
} else {
|
||||
try {
|
||||
$legacyFileKey = $this->keyManager->getFileKey($path, null, true);
|
||||
$legacyFileKey = $this->keyManager->getFileKey($path, true);
|
||||
if ($legacyFileKey === '') {
|
||||
$output->writeln('Got an empty legacy filekey for ' . $path . ', continuing', OutputInterface::VERBOSITY_VERBOSE);
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ class Encryption implements IEncryptionModule {
|
|||
* @throws DecryptionFailedException
|
||||
*/
|
||||
public function isReadable($path, $uid) {
|
||||
$fileKey = $this->keyManager->getFileKey($path, $uid, null);
|
||||
$fileKey = $this->keyManager->getFileKey($path, null);
|
||||
if (empty($fileKey)) {
|
||||
$owner = $this->util->getOwner($path);
|
||||
if ($owner !== $uid) {
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class Recovery {
|
|||
if ($item['type'] === 'dir') {
|
||||
$this->addRecoveryKeys($filePath . '/');
|
||||
} else {
|
||||
$fileKey = $this->keyManager->getFileKey($filePath, $this->user->getUID(), null);
|
||||
$fileKey = $this->keyManager->getFileKey($filePath, null);
|
||||
if (!empty($fileKey)) {
|
||||
$accessList = $this->file->getAccessList($filePath);
|
||||
$publicKeys = [];
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ class EncryptionTest extends TestCase {
|
|||
->willReturn(true);
|
||||
$this->keyManagerMock->expects($this->once())
|
||||
->method('getFileKey')
|
||||
->with($path, null, null, true)
|
||||
->with($path, null, true)
|
||||
->willReturn($fileKey);
|
||||
|
||||
$this->instance->begin($path, 'user', 'r', [], []);
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ class KeyManagerTest extends TestCase {
|
|||
}
|
||||
|
||||
$this->assertSame($expected,
|
||||
$this->instance->getFileKey($path, null, null)
|
||||
$this->instance->getFileKey($path, null)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue