Addresses reviewer feedback requesting consistent mock callback style
in RecoveryTest and UtilTest. Drops the now-unused setValueTester,
getValueTester, and removeValueTester helper methods.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Replace IConfig::{get,set}UserValue for the per-user 'recoveryEnabled' key
with IUserConfig::{getValueBool,setValueBool}, and IConfig::getAppValue for
'useMasterKey' with IAppConfig::getValueBool. IConfig is removed from Util
and Recovery constructors entirely. Clears the DeprecatedMethod psalm-baseline
entries for apps/encryption/lib/Util.php and the string-typed recoveryAdminEnabled
calls that were still in Recovery.php.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
The production code already uses getValueBool for this key; the IConfig
mock branch was unreachable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Switch all encryption config reads/writes from deprecated string-typed IConfig to
bool-typed IAppConfig (getValueBool/setValueBool). Adds RetypeEncryptionConfigKeys
repair step to retype existing string values to bool on upgrade. Includes lazy
IAppConfig resolution in Manager and AppConfigTypeConflictException fallbacks
throughout for safety during the upgrade window.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
The diff can be checked using: git diff --ignore-all-space --ignore-blank-lines
To see only the changes not related to blank lines.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
When using basic authentication the user is not logged in yet when
KeyManager constructor gets called, so we need to delay the check for
the loggedin user uid.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
If the current request does not have permissions for the filesystem we
must not try to setup the filesystem.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Louis <louis@chmn.me>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Symfony has added type hints on the `OutputFormatterInterface`,
so we must adjust our type hints to match with Symfony.
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
fileKey gets deleted upon save as it’s stored in shareKeys instead now.
We use presence of a fileKey to detect if a file is using the legacy
system or the new one, because we do not always have access to header
data.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>