aboutsummaryrefslogtreecommitdiffstats
path: root/src/state
diff options
context:
space:
mode:
Diffstat (limited to 'src/state')
-rw-r--r--src/state/mod.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs
index f7c5266..822f214 100644
--- a/src/state/mod.rs
+++ b/src/state/mod.rs
@@ -263,8 +263,9 @@ pub(crate) struct CatchUpSource {
/// The change just made in `replica` (the one head after `before`), judged by the
/// swarm's rules as every node will judge it on receipt (`access::rules`), under a policy
-/// judging every change: a write the API let through and the rules refuse would be
-/// refused everywhere, with everything built on it.
+/// judging every change, or one written where none did (which every node refuses where it
+/// turns the swarm strict, `rules::turns_strict`): a write the API let through and the
+/// rules refuse would be refused everywhere, with everything built on it.
fn judged_here(
replica: &crate::document::replica::Replica,
before: &[crate::document::ChangeHash],
@@ -273,7 +274,7 @@ fn judged_here(
// changing the policy is judged too.
let enforced = crate::document::at::At::new(&replica.doc, before)
.is_some_and(|at| crate::access::policy::of(&at).enforced());
- if !enforced {
+ if !enforced && crate::access::policy::of(&replica.doc) == crate::access::policy::Policy::Open {
return Ok(());
}
let after = replica.doc.get_heads();