fix(api): typed OpenAPI query params and not-found messages that hide private projects
- Query DTO properties with a default value (limit, offset, days, perColumn, assignedToMe, search, archived, requiresReason, force) were documented as `object` in openapi.json, which broke generated clients. They now declare their type explicitly. - Reading a private project, ticket, release or its comments without access answered "Project <internal id> not found", confirming the project exists. ReadAccess now reports what the caller asked for (e2e covered). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -977,7 +977,14 @@ describe('task-stream (e2e)', () => {
|
||||
() => rest(null, 'GET', `/projects/${key}`),
|
||||
(r) => r.status === 404,
|
||||
);
|
||||
expect((await rest(null, 'GET', `/issues/${issue}`)).status).toBe(404);
|
||||
const hidden = await rest(null, 'GET', `/issues/${issue}`);
|
||||
expect(hidden.status).toBe(404);
|
||||
// The answer names what was asked, not the private project behind it.
|
||||
expect(hidden.body['message']).toContain(issue);
|
||||
expect(hidden.body['message']).not.toContain(projectId);
|
||||
const project = await rest(null, 'GET', `/projects/${key}`);
|
||||
expect(project.body['message']).toContain(key);
|
||||
expect(project.body['message']).not.toContain(projectId);
|
||||
});
|
||||
|
||||
it('deletes a project with everything in it (cascade saga) and frees its key', async () => {
|
||||
|
||||
Reference in New Issue
Block a user