Skip to content

Commit

Permalink
Merge pull request #6 from rohitmp/main
Browse files Browse the repository at this point in the history
fixes #5 Cannot delete namespace permission from scabbard CLI
  • Loading branch information
agunde406 authored Feb 7, 2024
2 parents 837d392 + b80ce2b commit 42d6dda
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions services/scabbard/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ fn run() -> Result<(), CliError> {
.required(true),
Arg::with_name("contract")
.help("Name of the contract")
.required(true)
.conflicts_with("delete"),
.required(true),
Arg::with_name("read")
.help("Set read permission")
.short("r")
Expand Down Expand Up @@ -991,8 +990,13 @@ fn run() -> Result<(), CliError> {
.ok_or_else(|| CliError::MissingArgument("namespace".into()))?;

let payload_builder = if matches.is_present("delete") {
let contract = matches
.value_of("contract")
.ok_or_else(|| CliError::MissingArgument("contract".into()))?;

DeleteNamespaceRegistryPermissionActionBuilder::new()
.with_namespace(namespace.into())
.with_contract_name(contract.into())
.into_payload_builder()?
} else {
let contract = matches
Expand Down

0 comments on commit 42d6dda

Please sign in to comment.