diff options
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index ea15e06..0b6a58a 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -242,6 +242,14 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ ), #[cfg(feature = "federation")] option( + "store-readers", + Kind::List, + "USER,[USER...]", + None, + "With store-root or store-id: users of this node's HTTP API (htpasswd, user-header) who read the federation here and do nothing else: GET of the events API, and fork checks (docs/guides/federation/running-a-node.md, Its API). Its other users are its operators, who may do everything.", + ), + #[cfg(feature = "federation")] + option( "store-neighbour-parties", Kind::List, "NAME,[NAME...]", @@ -819,6 +827,9 @@ pub(crate) struct Settings { pub(crate) store_party: Option<String>, #[cfg(feature = "federation")] #[serde(default)] + pub(crate) store_readers: Vec<String>, + #[cfg(feature = "federation")] + #[serde(default)] pub(crate) store_neighbour_parties: Vec<String>, #[cfg(feature = "federation")] pub(crate) store_vote_key: Option<PathBuf>, @@ -1340,6 +1351,7 @@ impl Settings { ("store-file", self.store_file.is_some()), ("store-checkpoint", self.store_checkpoint.is_some()), ("store-party", self.store_party.is_some()), + ("store-readers", !self.store_readers.is_empty()), ( "store-neighbour-parties", !self.store_neighbour_parties.is_empty(), @@ -1491,6 +1503,8 @@ impl Settings { #[cfg(feature = "federation")] ("store-party", self.store_party.is_some()), #[cfg(feature = "federation")] + ("store-readers", !self.store_readers.is_empty()), + #[cfg(feature = "federation")] ( "store-neighbour-parties", !self.store_neighbour_parties.is_empty(), |
