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:
committed by
mathieui
parent
fbb93dbd08
commit
51930c1e78
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user