aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/signatures.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-07 22:35:21 +0100
committertv <tv@krebsco.de>2026-11-07 22:35:21 +0100
commitd7a6bc3ed201ff2ca953f74f62154e5e17728f22 (patch)
treeab5c1e4ebfab500539f313b8e8bebf95a6edf29e /src/document/signatures.rs
parentcc691bade836d27d02bb2330f0fa323a1d88a1bb (diff)
access: rules by path
access::rules::judge: a change judged as its writer saw the document (at its dependencies): committer a member or registering itself; members' entries and votes their own; epochs and swarm ID from roots; a remake's decision by its coordinator; the rest by the registry for the user the change names. Auth plan M6.
Diffstat (limited to 'src/document/signatures.rs')
-rw-r--r--src/document/signatures.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/document/signatures.rs b/src/document/signatures.rs
index d347e10..47e5917 100644
--- a/src/document/signatures.rs
+++ b/src/document/signatures.rs
@@ -24,7 +24,7 @@ use super::{ChangeHash, Document};
/// Where the swarm lists the paths whose writes are signed: a list of paths, each a
/// list of segments, as capabilities name them (`access.md`).
-pub(crate) const SIGNED_PATHS: [&str; 3] = ["_continuum", "access", "signed"];
+pub(crate) const SIGNED_PATHS: [&str; 3] = [super::meta::ROOT, super::meta::ACCESS, "signed"];
/// What a signature is made over: a domain, then the change's hash.
pub(crate) fn message(hash: &ChangeHash) -> Vec<u8> {
@@ -50,7 +50,7 @@ impl Sign {
Sign::Protocol => true,
Sign::Write { path, asked } => {
*asked
- || path.first().map(String::as_str) == Some(SIGNED_PATHS[0])
+ || super::meta::is_protocol(path)
|| listed(doc).iter().any(|signed| related(signed, path))
}
}