add default_persistence_allowed

In addition set all config options in every test, as catch2 can run
tests out of order and as demonstrated in
e1ad60af4f this can be an issue
This commit is contained in:
Luca Matei Pintilie authored and mathieui committed 2025-11-28 21:54:38 +01:00
1 parent fbb93dbd08
commit 51930c1e78
4 files changed
+47 -4

No files matched your search

@@ -19,7 +19,7 @@ namespace utils
* 2. `persist_user_allowlist` contains the requester's jid
* 3. `persist_user_denylist` contains the requester's domain
* 4. `persist_user_allowlist` contains the contains the requester's domain
* 5. allow
* 5. `default_persistence_allowed` is true (default true)
*/
inline bool is_requester_allowed_to_persist(const Jid &requester) {
// requester.bare checks
@@ -50,6 +50,6 @@ inline bool is_requester_allowed_to_persist(const Jid &requester) {
// default allow
// 5.
return true;
return Config::get_bool("default_persistence_allowed", true);
}
}