(ctx context.Context, params database.GetUserWorkspaceBuildParametersParams)
| 4815 | } |
| 4816 | |
| 4817 | func (q *querier) GetUserWorkspaceBuildParameters(ctx context.Context, params database.GetUserWorkspaceBuildParametersParams) ([]database.GetUserWorkspaceBuildParametersRow, error) { |
| 4818 | u, err := q.db.GetUserByID(ctx, params.OwnerID) |
| 4819 | if err != nil { |
| 4820 | return nil, err |
| 4821 | } |
| 4822 | // This permission is a bit strange. Reading workspace build params should be a permission |
| 4823 | // on the workspace. However, this use case is to autofill a user's last input |
| 4824 | // to some parameter. So this is kind of a "user setting". For now, this will |
| 4825 | // be lumped in with user personal data. Subject to change. |
| 4826 | if err := q.authorizeContext(ctx, policy.ActionReadPersonal, u); err != nil { |
| 4827 | return nil, err |
| 4828 | } |
| 4829 | return q.db.GetUserWorkspaceBuildParameters(ctx, params) |
| 4830 | } |
| 4831 | |
| 4832 | func (q *querier) GetUsers(ctx context.Context, arg database.GetUsersParams) ([]database.GetUsersRow, error) { |
| 4833 | // This does the filtering in SQL. |
nothing calls this directly
no test coverage detected