diff options
Diffstat (limited to 'src/remake/switch.rs')
| -rw-r--r-- | src/remake/switch.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/remake/switch.rs b/src/remake/switch.rs index bd40d72..df3fcc8 100644 --- a/src/remake/switch.rs +++ b/src/remake/switch.rs @@ -192,6 +192,18 @@ async fn switch<H: Host>( let translator = request .translator() .ok_or_else(|| format!("unknown remake kind {:?}", request.kind))?; + // A strict remake of a swarm strict already, committed by a majority of members + // anyway: not followed (`vote::strict_taken`, `catchup`). + if request.kind == "strict" + && host + .read_doc(|doc| crate::access::policy::of(doc).strict()) + .await + { + return Err( + "a strict remake of a swarm strict already: its registry changes by its users' signatures; not followed" + .to_owned(), + ); + } let late_translator = translator.clone(); let superseded = host.superseded(); let previous = request.previous; |
