From 664cf20c92548d7f2fff6191c783c0b2938e6d5b Mon Sep 17 00:00:00 2001 From: cloudhead Date: Thu, 8 Feb 2024 14:18:48 +0100 Subject: [PATCH] Change default seeding scope to 'all' This makes the default policy `block` with scope `all`. The good thing about this is that you don't have to manage individual nodes in the beginning. You simply seed the repos you want, and everything is followed within those repos. This matches user expectations, as `rad seed` does what you expect it to do. For open-policy seed nodes, it also means that simply changing `block` to `allow` from the default config is all you need. This leaves the non-default `followed` scope as a more "advanced" setting, since it is much more cumbersome: it forces you to follow a user before you can see their issues/patches, which is not something most users expect coming from old-shcool forges. --- radicle-cli/examples/rad-block.md | 2 +- radicle-cli/examples/rad-config.md | 2 +- radicle-httpd/src/api/v1/profile.rs | 2 +- radicle/src/node/policy.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/radicle-cli/examples/rad-block.md b/radicle-cli/examples/rad-block.md index 164f72a4..a9fa285d 100644 --- a/radicle-cli/examples/rad-block.md +++ b/radicle-cli/examples/rad-block.md @@ -5,7 +5,7 @@ For instance, if our default policy is to seed, any unknown repository will have its policy set to allow seeding: ``` $ rad inspect rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --policy -Repository rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji is being seeded with scope `followed` +Repository rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji is being seeded with scope `all` ``` Since there is no policy specific to this repository, there's nothing to be diff --git a/radicle-cli/examples/rad-config.md b/radicle-cli/examples/rad-config.md index b07f7cb7..3a60c80a 100644 --- a/radicle-cli/examples/rad-config.md +++ b/radicle-cli/examples/rad-config.md @@ -46,7 +46,7 @@ $ rad config } }, "policy": "block", - "scope": "followed" + "scope": "all" } } ``` diff --git a/radicle-httpd/src/api/v1/profile.rs b/radicle-httpd/src/api/v1/profile.rs index ccca4a40..e8286eee 100644 --- a/radicle-httpd/src/api/v1/profile.rs +++ b/radicle-httpd/src/api/v1/profile.rs @@ -108,7 +108,7 @@ mod routes { } }, "policy": "block", - "scope": "followed" + "scope": "all" } }, "home": seed.profile.path() diff --git a/radicle/src/node/policy.rs b/radicle/src/node/policy.rs index 22387aab..8befe8be 100644 --- a/radicle/src/node/policy.rs +++ b/radicle/src/node/policy.rs @@ -95,9 +95,9 @@ impl TryFrom<&sqlite::Value> for Policy { #[serde(rename_all = "camelCase")] pub enum Scope { /// Seed remotes that are explicitly followed. - #[default] Followed, /// Seed all remotes. + #[default] All, }