Skip to content

Add photo support

Nicolas Froger requested to merge photos into develop

This adds photo support to the Intranet.

CRIPhotoKind allows different types of photo with priorities (assistants over student for example) CRIPhoto represents a picture, square and thumb is generated automatically. If square can't be generated, it can be manually uploaded.

Unauthenticated users will only see blank pictures to respect privacy of students. Users can chose if they consent that their picture is public on their profile.

Photos are stored in a private S3 bucket, separate from the static files one. The intranet acts as proxy to access pictures.

TODO:

  • Upload pictures, assign to user, set kind
  • Generate thumb
  • Generate square
  • Set session cookie for photo hostname on login on the intranet (might be better to deprecate that hostname)
  • Add authenticated endpoint for users' picture, with blank when unauthenticated
  • Add form on profile to consent public photo when unauthenticated
  • Find a solution for Moodle and OIDC in general (this breaks the photo import I believe)
  • Add API routes
  • Make everything beautiful in admin
  • Adapt photo getting in card generation

Closes #32 (closed)

Edited by Nicolas Froger

Merge request reports