mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-09-13 14:59:09 +00:00
Implement CEL filter in list group command
This commit is contained in:
parent
20e3a72c92
commit
6562aeab95
2 changed files with 72 additions and 0 deletions
|
@ -51,6 +51,10 @@ func GroupList(cmd *cobra.Command, args []string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
celFilter, err := cmd.Flags().GetString("filter")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx := util.GetContext()
|
||||
|
||||
|
@ -69,6 +73,11 @@ func GroupList(cmd *cobra.Command, args []string) error {
|
|||
return fmt.Errorf("Listing Group: %w", err)
|
||||
}
|
||||
|
||||
groups, err = filterGroups(&groups, celFilter, ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if jsonOutput {
|
||||
outputGroups := []GroupJsonOutput{}
|
||||
for i := range groups {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue