User: Pass name to list users to filter out the correct one (#94153)

Pass name to list users to filter out the correct one
This commit is contained in:
Karl Persson
2024-10-02 17:02:32 +02:00
committed by GitHub
parent 41b175e7ae
commit d75a9b6aeb
+5 -5
View File
@@ -100,12 +100,12 @@ func (s *LegacyStore) Get(ctx context.Context, name string, options *metav1.GetO
if err != nil {
return nil, err
}
query := legacy.ListUserQuery{
OrgID: ns.OrgID,
Pagination: common.Pagination{Limit: 1},
}
found, err := s.store.ListUsers(ctx, ns, query)
found, err := s.store.ListUsers(ctx, ns, legacy.ListUserQuery{
OrgID: ns.OrgID,
UID: name,
Pagination: common.Pagination{Limit: 1},
})
if found == nil || err != nil {
return nil, resource.NewNotFound(name)
}