feat(F-154): completed feature

This commit is contained in:
chattie
2026-08-22 08:35:46 +02:00
parent 1415590106
commit 5098723284
19 changed files with 535 additions and 114 deletions

View File

@@ -159,7 +159,11 @@ describe.skipIf(!hasDb)('users + RBAC flows (real PostgreSQL)', () => {
});
expect(asAdmin.statusCode).toBe(200);
const body = asAdmin.json() as { items: Array<{ id: string }> };
expect(body.items.some((item) => item.id === anaId)).toBe(true);
// F-154: /users now serves storefront customers only (role 'customer').
// ana was promoted to 'admin' -> no longer a customer -> excluded from the list.
// ben is a storefront customer -> included.
expect(body.items.some((item) => item.id === benId)).toBe(true);
expect(body.items.some((item) => item.id === anaId)).toBe(false);
// Admin can also read another user's profile (owner-or-admin).
const adminReadsBen = await app.inject({