aboutsummaryrefslogtreecommitdiffstats
path: root/src/access/rules.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/access/rules.rs')
-rw-r--r--src/access/rules.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/access/rules.rs b/src/access/rules.rs
index 6844dc9..d1edfd5 100644
--- a/src/access/rules.rs
+++ b/src/access/rules.rs
@@ -167,6 +167,18 @@ pub(crate) fn judge_reading(
"a swarm turns strict only at its start or through a strict remake".to_owned(),
));
}
+ // A swarm holding a store: judged by what its changes write. A swarm holds one from
+ // its genesis change, or not at all.
+ #[cfg(feature = "federation")]
+ match policy {
+ Policy::Store(fold) => return super::holding::judge(&at, change, fold),
+ _ if super::holding::turns_store(change.ops) => {
+ return Err(Refusal::Rule(
+ "a swarm holds a store from its genesis change only".to_owned(),
+ ));
+ }
+ _ => {}
+ }
if !policy.enforced() {
return Ok(());
}