cli: Do not print scope in block table
Previous implementation used the default scope when a scope wasn't present. Scope is not present when the policy is block, because block doesn't have a scope. Instead use an empty string when printing the block policy.
This commit is contained in:
parent
b5e8776efd
commit
dd13eed1d0
|
|
@ -38,7 +38,7 @@ $ rad seed
|
||||||
╭───────────────────────────────────────────────────────────╮
|
╭───────────────────────────────────────────────────────────╮
|
||||||
│ Repository Name Policy Scope │
|
│ Repository Name Policy Scope │
|
||||||
├───────────────────────────────────────────────────────────┤
|
├───────────────────────────────────────────────────────────┤
|
||||||
│ rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji block all │
|
│ rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji block │
|
||||||
╰───────────────────────────────────────────────────────────╯
|
╰───────────────────────────────────────────────────────────╯
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,9 @@ pub fn seeding(profile: &Profile) -> anyhow::Result<()> {
|
||||||
.repository(rid)
|
.repository(rid)
|
||||||
.and_then(|repo| repo.project().map(|proj| proj.name().to_string()))
|
.and_then(|repo| repo.project().map(|proj| proj.name().to_string()))
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let scope = policy.scope().unwrap_or_default().to_string();
|
let scope = policy
|
||||||
|
.scope()
|
||||||
|
.map_or(String::new(), |scope| scope.to_string());
|
||||||
let policy = term::format::policy(&Policy::from(policy));
|
let policy = term::format::policy(&Policy::from(policy));
|
||||||
|
|
||||||
t.push([
|
t.push([
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue