GetUsersByIDs is only used for usernames on workspace return data. This function should be replaced by joining this data to the workspace query itself.
(ctx context.Context, ids []uuid.UUID)
| 4842 | // This function should be replaced by joining this data to the workspace query |
| 4843 | // itself. |
| 4844 | func (q *querier) GetUsersByIDs(ctx context.Context, ids []uuid.UUID) ([]database.User, error) { |
| 4845 | for _, uid := range ids { |
| 4846 | if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceUserObject(uid)); err != nil { |
| 4847 | return nil, err |
| 4848 | } |
| 4849 | } |
| 4850 | return q.db.GetUsersByIDs(ctx, ids) |
| 4851 | } |
| 4852 | |
| 4853 | func (q *querier) GetWebpushSubscriptionsByUserID(ctx context.Context, userID uuid.UUID) ([]database.WebpushSubscription, error) { |
| 4854 | if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceWebpushSubscription.WithOwner(userID.String())); err != nil { |
nothing calls this directly
no test coverage detected