fix(ui): hide write/edit controls from READ_ALL (read-only) users (#696) #699

Merged
marcel merged 4 commits from feat/issue-696-hide-write-controls into main 2026-05-31 11:31:35 +02:00
Showing only changes of commit 97274beba0 - Show all commits

View File

@@ -90,6 +90,16 @@ describe('Layout upload link', () => {
.element(page.getByRole('link', { name: /Hochladen|Upload|Subir/i }))
.not.toBeInTheDocument();
});
it('is hidden for an ANNOTATE_ALL-only user (gate is lack of WRITE_ALL, not READ_ALL)', async () => {
render(Layout, {
data: makeData({ canWrite: false, canAnnotate: true }),
children: emptySnippet
});
await expect
.element(page.getByRole('link', { name: /Hochladen|Upload|Subir/i }))
.not.toBeInTheDocument();
});
});
// ─── Dropdown ─────────────────────────────────────────────────────────────────