Browse Source

fix: use backend-normalized group.Name in CreateGroup response

After credentialManager.CreateGroup may normalize the name (e.g.,
trim whitespace), use group.Name instead of the raw input for
the returned GroupData to ensure consistency.
pull/8560/head
Chris Lu 17 hours ago
parent
commit
56773ebf18
  1. 4
      weed/admin/dash/group_management.go

4
weed/admin/dash/group_management.go

@ -91,9 +91,9 @@ func (s *AdminServer) CreateGroup(ctx context.Context, name string) (*GroupData,
if err := s.credentialManager.CreateGroup(ctx, group); err != nil {
return nil, fmt.Errorf("failed to create group: %w", err)
}
glog.V(1).Infof("Created group %s", name)
glog.V(1).Infof("Created group %s", group.Name)
return &GroupData{
Name: name,
Name: group.Name,
Status: "enabled",
}, nil
}

Loading…
Cancel
Save