From b80ce2bdf5eb512f8d76d38b4e751b3592e3348e Mon Sep 17 00:00:00 2001 From: Rohit Patil Date: Tue, 6 Feb 2024 22:12:52 +0530 Subject: [PATCH] fixes #5 Cannot delete namespace permission from scabbard CLI Signed-off-by: Rohit Patil --- services/scabbard/cli/src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/scabbard/cli/src/main.rs b/services/scabbard/cli/src/main.rs index 3eeae4116..fe5215be6 100644 --- a/services/scabbard/cli/src/main.rs +++ b/services/scabbard/cli/src/main.rs @@ -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") @@ -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