aboutsummaryrefslogtreecommitdiffstats
path: root/src/access/screen.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/access/screen.rs')
-rw-r--r--src/access/screen.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/access/screen.rs b/src/access/screen.rs
index 8fd2c61..becf3bc 100644
--- a/src/access/screen.rs
+++ b/src/access/screen.rs
@@ -415,6 +415,8 @@ pub(crate) fn apply(
// The values their users sign, under a strict policy, as the document holds them:
// read again once the document takes the accepted (`reaches_signed`).
let mut signed: Option<Option<Vec<Vec<String>>>> = None;
+ // What those looked at so far made (`changes::Written`).
+ let mut written = crate::document::changes::Written::default();
for (index, change) in ready.into_iter().enumerate() {
let hash = change.hash();
let committer = committers[index].as_deref();
@@ -442,6 +444,12 @@ pub(crate) fn apply(
.push(refuse(format!("it builds on refused change {dep}")));
continue;
}
+ // None that Automerge writes: refused before Automerge sees it.
+ if let Some(why) = written.check(doc, &change, &decoded[index]) {
+ refused.insert(hash, hash);
+ screened.refused.push(refuse(why));
+ continue;
+ }
// Made under an actor whose change at its seq the document holds: forged, by
// whoever brought it, not by the node the actor is.
if signatures