My details: show the CV photo instead of only saying that one is kept #1246
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#1246
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
On the profile page (My details), the "Your CV photo" card says only "A CV photo is kept." There is nothing to see: to know which photo a CV will print, the person must make a CV and look at it, or upload another one to be sure.
Where
src/postulo/templates/accounts/profile.html, thedata-cv-photo-stateparagraph ({% if profile.has_cv_photo %}A CV photo is kept.). The photo itself is stored inProfilePicturewith kindCVand reaches documents only as adata:address (avatars.cv_photo_data_uri), because the page's policy allows images from'self'anddata:only (#668).Expected
altthat says what it is ("Your CV photo") and its dimensions and size in words beside it.How it is served
Either inline from
cv_photo_data_uri(no new route, but it adds the photo's bytes to every profile page load) or a small owner-only route that sends the image with a cache header andContent-Disposition: inline,nosniff, and no sharing. Pick the route if the photo is large; say which in the decision. The photo is private to the person: no share, no API listing, and the route answers 404 to anyone else.Tests
The page shows the image when one is kept and the text when not; the route (if added) is owner-only and cached; the browser test checks the image loads under the page's content security policy; right-to-left and 320 px do not overflow.