✨(backend) add upload-only ("file request") link mode (RFC for #770)#771
Draft
maartendra wants to merge 1 commit into
Draft
✨(backend) add upload-only ("file request") link mode (RFC for #770)#771maartendra wants to merge 1 commit into
maartendra wants to merge 1 commit into
Conversation
RFC / draft for suitenumerique#770. Adds a link_upload_only flag on Item: when set on a link with PUBLIC or AUTHENTICATED reach, the link grants create-only access. An (anonymous) recipient can add files but cannot list, download, or edit the folder's existing contents, unlike the current Public + Editor path which requires authentication and exposes everything already there. get_abilities: an upload-only link no longer raises the user's role (so read/list/download stay off); children_create is granted even anonymously; retrieve stays on so the recipient can see the target folder to upload into. Exposed read-only on ItemSerializer and writable via LinkItemSerializer. Backend only for now; the frontend drop-zone view is a fast-follow. Opening as a draft to align on the design (this Drive-local flag vs. a role in django-lasuite) before polishing.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Draft / RFC for #770.
What
Adds an upload-only ("file request") link mode: a
link_upload_onlyflag onItemthat, on a link with PUBLIC/AUTHENTICATED reach, grants create-only access. An (anonymous) recipient can add files but cannot list, download, or edit the folder's existing contents.This is the confidentiality-preserving variant of #706: today the only way to let outsiders upload is Public + Editor, which exposes (and lets them edit) everything already in the folder — a leak for the common "collect documents from many separate people" use case (a therapist collecting client documents, a teacher receiving homework, a posting receiving CVs).
Backend changes
Item.link_upload_onlyboolean + migration0025.get_abilities: an upload-only link no longer raises the user's role (read / list / download stay off), butchildren_createis granted even to anonymous users;retrievestays on so the recipient can see the target folder to upload into.ItemSerializer, writable viaLinkItemSerializer(thelink-configurationendpoint).Deliberately not here yet
django-lasuite. If you'd rather model it as a new link role indjango-lasuite(consistent across La Suite apps), I'm happy to reshape it — that's the main thing I'd like your steer on.Context: we run Drive in production at email.eu and hit this with a real customer, so we're keen to see it through. Feedback very welcome.