Fix code around default policies

Make the code a little clearer and ensure that we are always calling the
`Config` and not the `Store`, so that we fallback on the default policy.
This commit is contained in:
cloudhead
2024-01-25 21:11:08 +01:00
parent 646fb7a24b
commit e9be685edf
+6 -1
View File
@@ -58,7 +58,12 @@ async fn node_policies_repos_handler(State(ctx): State<Context>) -> impl IntoRes
let policies = ctx.profile.policies()?;
let mut repos = Vec::new();
for policy::Repo { id, scope, policy } in policies.seed_policies()? {
for policy::SeedPolicy {
rid: id,
scope,
policy,
} in policies.seed_policies()?
{
repos.push(json!({
"id": id,
"scope": scope,