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.
This commit is contained in:
cloudhead 2024-02-08 14:18:48 +01:00
parent 292ff01923
commit 664cf20c92
No known key found for this signature in database
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -46,7 +46,7 @@ $ rad config
}
},
"policy": "block",
"scope": "followed"
"scope": "all"
}
}
```

View File

@ -108,7 +108,7 @@ mod routes {
}
},
"policy": "block",
"scope": "followed"
"scope": "all"
}
},
"home": seed.profile.path()

View File

@ -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,
}