ListForAssignment returns active users for assignment dropdowns.
(ctx context.Context)
| 277 | |
| 278 | // ListForAssignment returns active users for assignment dropdowns. |
| 279 | func (s *UsersStore) ListForAssignment(ctx context.Context) ([]models.User, error) { |
| 280 | d := s.db.DB(ctx) |
| 281 | rows, err := d.Queries.ListActiveUsers(ctx) |
| 282 | if err != nil { |
| 283 | return nil, err |
| 284 | } |
| 285 | out := make([]models.User, len(rows)) |
| 286 | for i := range rows { |
| 287 | out[i] = dbUserToModel(rows[i]) |
| 288 | } |
| 289 | return out, nil |
| 290 | } |
| 291 | |
| 292 | // UpdateTfaSecret sets the TFA secret (during setup, before enabled). |
| 293 | func (s *UsersStore) UpdateTfaSecret(ctx context.Context, userID string, secret *string) error { |
nothing calls this directly
no test coverage detected