SocialFinanceDigitalLabs / sf-fons-platform

https://github.com/SocialFinanceDigitalLabs/sf-fons
1 stars 0 forks source link

User interface: Users can see and delete input files, but not download #58

Open MichaelHanksSF opened 5 months ago

MichaelHanksSF commented 5 months ago

Layer between Django and UI that: allows users to:

but prevents users from:

"With Django interposed in this process we need it to act as a proxy for the filesystem rather than providing it directly - instead sending us enough information to display file listings and allow some downloads from within Django (rather than from S3) but shielding the filesystem so links cannot be constructed"

So we need: "1. A new Django app inside the existing deployment to act as this proxy with a suitable API exposed" "2. A new "file listing" TS component which can display some file information and controls but which does not depend on a mounted filesystem being exposed"

MichaelHanksSF commented 5 months ago

Dave to put more detail in task

MichaelHanksSF commented 5 months ago

@dotloadmovie to add more details please!

dotloadmovie commented 5 months ago

My view of this functionality is that it should consist of three API endpoints, similar to the full version elsewhere in the Django layer:

This functionality is essentially middleware, sitting between the REST URL layer and the pyfilesystem mounting. It will need to contain logic to determine what files a user may delete or get (probably cast pretty broadly - ie only log files can be downloaded, all files can be deleted)

The associated front-end can then be pretty dumb. It needs only to issue the commands from the user, list files, and perform some error handling.

MichaelHanksSF commented 5 months ago

Thanks @dotloadmovie !

@cyramic can you please review these notes before COP today and ask Dave anything you are unsure about?

ChoEjik commented 4 months ago

Subtasks:

Backend