feat(cli/org): org get + list with per-member grant filtering
This commit is contained in:
@@ -512,8 +512,18 @@ pub(crate) enum OrgCommands {
|
||||
#[command(subcommand)]
|
||||
kind: OrgAddKind,
|
||||
},
|
||||
// Item subcommands (Get/List/Edit/Rm/Restore/Purge) are added by
|
||||
// Tasks B11–B13, which extend this enum.
|
||||
/// Print an org item (secrets masked unless --show).
|
||||
Get {
|
||||
/// Item id or case-insensitive title substring.
|
||||
query: String,
|
||||
#[arg(long)] show: bool,
|
||||
},
|
||||
/// List org items visible to you (filtered by your collection grants).
|
||||
List {
|
||||
#[arg(long)] trashed: bool,
|
||||
},
|
||||
// Item subcommands (Edit/Rm/Restore/Purge) are added by
|
||||
// Tasks B12–B13, which extend this enum.
|
||||
}
|
||||
|
||||
#[derive(clap::Subcommand)]
|
||||
@@ -654,8 +664,16 @@ fn main() -> Result<()> {
|
||||
};
|
||||
commands::org::run_add(&d, &collection, add_kind, tags)?;
|
||||
}
|
||||
// Item dispatch arms (Get/List/Edit/Rm/Restore/Purge) added by
|
||||
// Tasks B11–B13.
|
||||
OrgCommands::Get { query, show } => {
|
||||
let d = crate::org_session::org_dir(dir_path)?;
|
||||
commands::org::run_get(&d, &query, show)?;
|
||||
}
|
||||
OrgCommands::List { trashed } => {
|
||||
let d = crate::org_session::org_dir(dir_path)?;
|
||||
commands::org::run_list(&d, trashed)?;
|
||||
}
|
||||
// Item dispatch arms (Edit/Rm/Restore/Purge) added by
|
||||
// Tasks B12–B13.
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user