shell: update s3.configure to list users instead of full config

This commit is contained in:
Chris Lu
2026-01-26 12:17:27 -08:00
parent cde707dd8b
commit f3304ead53
+5 -5
View File
@@ -138,14 +138,14 @@ func (c *commandS3Configure) Do(args []string, commandEnv *CommandEnv, writer io
func (c *commandS3Configure) listConfiguration(commandEnv *CommandEnv, writer io.Writer) error {
return pb.WithGrpcClient(false, 0, func(conn *grpc.ClientConn) error {
client := iam_pb.NewSeaweedIdentityAccessManagementClient(conn)
resp, err := client.GetConfiguration(context.Background(), &iam_pb.GetConfigurationRequest{})
resp, err := client.ListUsers(context.Background(), &iam_pb.ListUsersRequest{})
if err != nil {
return err
}
var buf bytes.Buffer
filer.ProtoToText(&buf, resp.Configuration)
fmt.Fprint(writer, buf.String())
fmt.Fprintln(writer)
fmt.Fprintln(writer, "Users:")
for _, user := range resp.Usernames {
fmt.Fprintf(writer, "- %s\n", user)
}
return nil
}, commandEnv.option.FilerAddress.ToGrpcAddress(), false, commandEnv.option.GrpcDialOption)
}