From dff4dd545e777fb16470f7ae26d0a94acf265c16 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 15 Apr 2024 10:47:45 +0300 Subject: [PATCH] [#1095] cli: Support user/group target for local overrides Signed-off-by: Evgenii Stratonikov --- cmd/frostfs-cli/modules/control/list_rules.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmd/frostfs-cli/modules/control/list_rules.go b/cmd/frostfs-cli/modules/control/list_rules.go index b345ecbfb..f5fc27bda 100644 --- a/cmd/frostfs-cli/modules/control/list_rules.go +++ b/cmd/frostfs-cli/modules/control/list_rules.go @@ -27,6 +27,8 @@ const ( defaultNamespace = "root" namespaceTarget = "namespace" containerTarget = "container" + userTarget = "user" + groupTarget = "group" ) const ( @@ -66,6 +68,16 @@ func parseTarget(cmd *cobra.Command) *control.ChainTarget { Name: name, Type: control.ChainTarget_CONTAINER, } + case userTarget: + return &control.ChainTarget{ + Name: name, + Type: control.ChainTarget_USER, + } + case groupTarget: + return &control.ChainTarget{ + Name: name, + Type: control.ChainTarget_GROUP, + } default: commonCmd.ExitOnErr(cmd, "read target type error: %w", errUnknownTargetType) }