fix(portal) : embed project id/name in /me response for client users

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 21:37:18 +01:00
parent 254f8bc411
commit 1f31a3a33f
2 changed files with 6 additions and 7 deletions

View File

@@ -68,13 +68,12 @@ async function loadData() {
isLoading.value = true
try {
if (auth.user?.roles?.includes('ROLE_ADMIN')) {
// Admin sees all projects
const allProjects = await projectService.getAll({ archived: false })
projects.value = allProjects
projects.value = await projectService.getAll({ archived: false })
} else {
// Client sees allowed projects
projects.value = auth.user?.allowedProjects ?? []
// allowedProjects are embedded objects from /api/me (with me:read group)
projects.value = (auth.user?.allowedProjects ?? []) as Project[]
}
tickets.value = await clientTicketService.getAll()
} finally {
isLoading.value = false