Skip to content

Commit

Permalink
small cleanuip
Browse files Browse the repository at this point in the history
  • Loading branch information
jakedoublev committed Mar 20, 2024
1 parent 494a8ab commit 267f314
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cmd/policy-attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"strings"

"github.com/opentdf/platform/protocol/go/common"
"github.com/opentdf/platform/protocol/go/policy"
"github.com/opentdf/tructl/pkg/cli"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -208,11 +207,7 @@ used to define the access controls based on subject encodings and entity entitle
id := flagHelper.GetRequiredString("id")
labels := flagHelper.GetStringSlice("label", metadataLabels, cli.FlagHelperStringSliceOptions{Min: 0})

behavior := common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_EXTEND
if forceReplaceMetadataLabels {
behavior = common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_REPLACE
}
if _, err := h.UpdateAttribute(id, getMetadata(labels), behavior); err != nil {
if _, err := h.UpdateAttribute(id, getMetadata(labels), getMetadataUpdateBehavior()); err != nil {
cli.ExitWithError("Could not update attribute", err)
} else {
fmt.Println(cli.SuccessMessage(fmt.Sprintf("Attribute id: %s updated.", id)))
Expand Down

0 comments on commit 267f314

Please sign in to comment.