Enforce the doc-share alias rights server-side

FixDocsService
Ya
14 Agosti 2026, 22:22 UTC
Mwandishi
Kamo
Ahadi ya
757a7a2

GET /shares/resolve-alias turns a guessable alias into a real person's NAME and required only a valid session. The rule lived solely in ShareDocumentDialog, and the route is reachable directly through APIService's /api/docs/** forward, so the client check was advisory — the same shape as the hole LegalPackageAccess exists to close. Mirrors the dialog exactly: a team member may always resolve; anyone else needs the alias right for the KIND of person the alias resolved to, which is why the lookup happens before the right check. A miss still answers 404 first, so a non-existent alias leaks nothing either way. The dialog's third term, memberTypeUnknown, is deliberately NOT mirrored. It is a fallback for sessions issued before memberType existed; the server always knows the type, and copying it would leave the gate bypassable forever by presenting an old session. No lockout: the browser already refuses these calls for members without the right, so the only traffic newly rejected is a direct API call that was bypassing the rule. No seeding needed. Three existing tests construct ImagingController directly and take the new Docstor.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei