Compare commits

...

2 Commits

Author SHA1 Message Date
Michal
c6cc39c6f7 fix: project list should use RBAC filtering, not ownerId
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / package (pull_request) Has been cancelled
The list endpoint was filtering by ownerId before RBAC could include
projects the user has view access to via name-scoped bindings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:52:13 +00:00
de074d9a90 Merge pull request 'feat: remove ProjectMember, add expose RBAC role, attach/detach-server' (#24) from feat/project-improvements into main
Some checks are pending
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / test (push) Waiting to run
CI / build (push) Blocked by required conditions
CI / package (push) Blocked by required conditions
2026-02-23 17:50:24 +00:00

View File

@@ -2,9 +2,9 @@ import type { FastifyInstance } from 'fastify';
import type { ProjectService } from '../services/project.service.js'; import type { ProjectService } from '../services/project.service.js';
export function registerProjectRoutes(app: FastifyInstance, service: ProjectService): void { export function registerProjectRoutes(app: FastifyInstance, service: ProjectService): void {
app.get('/api/v1/projects', async (request) => { app.get('/api/v1/projects', async () => {
// If authenticated, filter by owner; otherwise list all // RBAC preSerialization hook handles access filtering
return service.list(request.userId); return service.list();
}); });
app.get<{ Params: { id: string } }>('/api/v1/projects/:id', async (request) => { app.get<{ Params: { id: string } }>('/api/v1/projects/:id', async (request) => {