test(IT): Test Config Encryption use cases

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2024-09-05 06:28:54 +02:00
parent 2508f40721
commit e2640355a4
2 changed files with 45 additions and 10 deletions

View File

@@ -130,13 +130,18 @@ final class SaveController extends SimpleControllerBase
$this->masterPassService->changeMasterPassword($request);
$this->eventDispatcher->notify('update.masterPassword.end', new Event($this));
return ActionResponse::ok(__u('Master password updated'), __u('Please, restart the session to update it'));
} else {
$this->eventDispatcher->notify('update.masterPassword.hash', new Event($this));
$this->masterPassService->updateConfig(Hash::hashKey($newMasterPass));
}
return ActionResponse::ok(__u('Master password updated'), __u('Please, restart the session to update it'));
return ActionResponse::ok(
__u('Master password updated'),
[__u('No accounts updated, only hash'), __u('Please, restart the session to update it')]
);
}
}
/**