aboutsummaryrefslogtreecommitdiffstats
path: root/src/access/bans.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-29 03:15:05 +0000
committertv <tv@krebsco.de>2026-11-29 03:15:05 +0000
commit9188fa6e13ea7facfab5fb6f55bf26444ec2c01e (patch)
tree28b33908d0519bd21b03ee18bb34126c484ec0bb /src/access/bans.rs
parentc396d33a34ee6685e9a561baa4d3ae4956b697be (diff)
document: values read and written through a view any kind of document gives
document::view: Read (the value at a path, plain, typed, a map's keys) and Write (a value written, one deleted), which Automerge's documents, writes in progress and documents as they were all are. The member registry, the users, access control's reads and rules, the topology, forgetting and bootstrap read and write through them, and name neither Automerge's ReadDoc and Transactable nor document::store, which is what an Automerge document can do beyond. How a swarm holding a store judges what a change writes is handed to the rules (rules::judge_seen), being its kind of document's to say.
Diffstat (limited to 'src/access/bans.rs')
-rw-r--r--src/access/bans.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/access/bans.rs b/src/access/bans.rs
index a314f49..999f610 100644
--- a/src/access/bans.rs
+++ b/src/access/bans.rs
@@ -5,7 +5,8 @@
//! (`access::rules`, judged as the ban stood when they were made), and the tokens it
//! issued (`access::token`). Deleting the entry lifts the ban.
-use crate::document::{ReadDoc, meta, store};
+use crate::document::meta;
+use crate::document::view::{self, Read};
/// Where `node`'s ban is.
pub(crate) fn path(node: &str) -> Vec<String> {
@@ -13,6 +14,6 @@ pub(crate) fn path(node: &str) -> Vec<String> {
}
/// Whether `doc` bans `node`.
-pub(crate) fn banned(doc: &impl ReadDoc, node: &str) -> bool {
- store::read_plain(doc, &path(node)).ok().flatten().is_some()
+pub(crate) fn banned(doc: &impl Read, node: &str) -> bool {
+ view::read_plain(doc, &path(node)).ok().flatten().is_some()
}