Skip to content

Commit

Permalink
fixes #5 Cannot delete namespace permission from scabbard CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Patil <[email protected]>
  • Loading branch information
rohitmp authored and agunde406 committed Feb 7, 2024
1 parent 92f64ef commit 49d1ec5
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 49d1ec5

Please sign in to comment.