Commit Graph
1175 Commits
Author SHA1 Message Date
Nicolas Clerc 650a29a5ed (frontend) add file type category filter
Replace the folder/file toggle in the topbar with a file type category
filter (text document, slides, spreadsheet, pdf, image, video, audio,
archive, other), wired to the backend category filter.
2026-06-29 15:42:58 +02:00
Nicolas Clerc b88bd752aa (backend) filter search results by location
Add a single location query parameter to the search endpoint, exposing
the My files, Shared with me, Starred and Trashbin views. Trashbin
overrides the scope filter as it implies a deleted scope.
2026-06-29 15:42:58 +02:00
Nicolas Clerc 21284be5d2 ♻️(backend) extract item location querysets
Centralize creator, favorite and owner filtering as ItemQuerySet
methods, so the list filters, the trashbin endpoint and the upcoming
search location filter share a single definition.
2026-06-29 15:42:58 +02:00
Nicolas Clerc c22e7b2f13 (backend) list a user's frequent contacts
Add a contacts endpoint on the user viewset returning the people who
share items with the current user, ranked by the number of shared
items. It mirrors the contact filter perimeter (direct and team
access, live items only) so every suggestion yields a result.
2026-06-29 15:42:58 +02:00
Nicolas Clerc 7acec3fb56 (backend) filter items list by modification date
Add an updated_at date range filter on the items list so results can
be narrowed to a modification period. Bounds match on the date part,
so a date-only bound covers the whole day rather than stopping at
midnight.
2026-06-29 15:42:57 +02:00
Nicolas Clerc 4b70839ce6 (backend) filter items list by shared contact
Add a contact filter on the items list returning the items in which
the given user is involved through a sharing access, in either
direction, so users can find files they share with a given person.
2026-06-29 15:42:36 +02:00
Nicolas Clerc 2d86437c0e (backend) add file type category filter
Add a `category` filter on the items list to narrow results by file
type (text document, slides, spreadsheet, pdf, image, video, audio,
archive, other). Categories are matched on the filename extension,
since several listed formats share ambiguous mime types.
2026-06-29 15:42:11 +02:00
Nicolas Clerc 7279d09a8e (backend) improve demo users for sharing fixtures
The sharing filter needs a realistic contact picker with user names.
Switching from anonymous emails to a fixed list of named users gives
the demo database the full_name and short_name fields required for
that UI.
2026-06-29 15:41:30 +02:00
Nicolas Clerc 0a0199fc21 (backend) add file type fixtures to create_demo
The --file-types flag creates one fixture per category (docx, xlsx,
pptx, pdf, image, video, zip, mp3, binary) so developers can populate
a local demo database covering all filter-relevant types, without
having to upload real files manually.
2026-06-29 15:32:36 +02:00
Nicolas Clerc f53d80dc98 📝(readme) improve clarity and consistency in README
Update README to enhance clarity and consistency throughout the document.
2026-06-24 09:07:11 +02:00
ltermandNicolas Clerc 1843036f68 📝(contributing) enrich contributing guidelines
Add sections for non-technical contributions (translations,
design, issues), maintainers contact info, PR best practices,
and AI-assisted contribution policy.
2026-06-23 19:25:13 +02:00
Nicolas Clerc dd7b20ba23 🐛(backend) stream export files from S3 without buffering
default_storage.open() downloads the whole object in memory before the
first read, so exporting folders holding large files can exhaust the
worker memory. Stream straight from the boto3 response body instead.
2026-06-23 18:00:58 +02:00
Nicolas Clerc d49b79a7ef (backend) wait for analysis before converting a file
Conversion reads the source bytes, so it must not run before malware
analysis confirms the file is safe. convert_file now waits while the
source is analyzing and drops the placeholder if it never clears.
2026-06-23 17:22:52 +02:00
Nicolas Clerc 3587826e1e (backend) accept conversion requests during analysis
Let a conversion be queued while the source is still analyzed; the real
conversion stays gated on READY in perform_conversion.
2026-06-23 17:22:52 +02:00
Nicolas Clerc 1dbcf31039 (backend) expose convert ability during analysis
A file uploaded by a user must stay usable during malware analysis,
including conversion. Flag the convert ability while the source is being
analyzed so the frontend offers it.
2026-06-23 17:22:52 +02:00
Nicolas Clerc c7699d7324 🔧(backend) delay dummy malware analysis in dev
The inline dummy backend reported files safe before the upload response
returned, so the analyzing upload state was never observable. Delay the
safe result off the request thread to expose it for frontend testing.
2026-06-23 17:22:52 +02:00
Nicolas Clerc 5ed80ae77e 🐛(frontend) keep analyzing items accessible
Marking the analyzing state as transient locked freshly uploaded items in
the UI while malware detection ran. The uploader must keep full access
during analysis, so split polling from the transient UI lock and surface
the analyzing label as a non-blocking badge. The 404 conversion toast is
now limited to converting placeholders.
2026-06-23 17:22:52 +02:00
Nicolas Clerc 630209ff53 ⬆️(backend) bump PyJWT and cryptography for security fixes
PyJWT 2.13.0 fixes CVE-2026-48526 (auth bypass via forged JWT).
cryptography 49.0.0 ships a patched OpenSSL (GHSA-537c-gmf6-5ccf).
2026-06-22 18:09:24 +02:00
Nicolas Clerc 4fd3c79566 🔖(minor) bump release version 0.19.0
Added

- (backend) manage reconciliation requests for user accounts
- (backend) add recursive folder export as ZIP archive
- (frontend) add folder export action
- (backend) background conversion of legacy Office files
- (backend) allow grist file upload
- (frontend) add CTA on public link for anonymous and authenticated users

Changed

- 🐛(backend) replace VersionId by Etag for WOPI
- 🐛(backend) sanitize slash in template-created filenames

Removed

- 🔥(backend) drop deprecated numchild columns from item
v0.19.0 v0.19.0-preprod
2026-06-09 13:08:43 +02:00
Nicolas Clerc b5e8538744 🌐(frontend) update conversion modal content wording
Remove app name from the sentence to keep it generic.
2026-06-09 10:29:10 +02:00
Nicolas Clerc caa1dbc0e5 🐛(frontend) poll items in "analyzing" upload state
After upload, malware detection runs asynchronously. The frontend
was not polling the item so abilities like "convert" stayed stale
until page reload.
2026-06-08 17:15:47 +02:00
Nicolas Clerc 533606bbf0 🩹(backend) add suffix to converted filename
The converted file was missing '(converted)' suffix.
2026-06-08 16:17:02 +02:00
Nicolas Clerc 2d1636106b 🐛(docker) fix Collabora healthcheck without curl
Recent Collabora images no longer ship curl, breaking the
healthcheck. Use bash /dev/tcp as a fallback.

See CollaboraOnline/online#15919
2026-06-08 15:05:47 +02:00
Nicolas Clerc 350a4828f8 📝(backend) document OnlyOffice conversion environment variables
The conversion feature added in PR #719 introduced several settings
that were missing from the environment reference.
2026-06-08 11:59:32 +02:00
Nicolas Clerc 212f4f1b19 🐛(backend) reject conversion when JWT secret is not configured
Without the secret the request reaches OnlyOffice unsigned and fails
with a cryptic error code -8. Validate in the synchronous path before
creating the placeholder so the API returns an error immediately, and
hide the convert ability from the API so the frontend does not offer
the action.

The backend now reads the secret directly from settings, like it
already does for timeouts.
2026-06-08 11:59:32 +02:00
Nicolas Clerc c67cb28d65 🐛(backend) prefer WOPI query param over Authorization header
When OnlyOffice has JWT enabled it adds its own Authorization header to
outgoing file-download requests. The WOPI access token in the query
param must take precedence so the opaque token lookup succeeds.
2026-06-08 11:59:32 +02:00
Nicolas Clerc 5149283688 (backend) sign OnlyOffice conversion requests with JWT
The OnlyOffice server rejects unsigned /converter requests with error
code -8 when JWT is enabled.

Add a dedicated WOPI_ONLYOFFICE_CONVERT_JWT_SECRET setting and fix the
JWT body token format to match the OnlyOffice conversion API: encode
parameters directly instead of wrapping them in {"payload": …}, and
send only {"token": "…"} in the request body.

Enable JWT on the development OnlyOffice container so the issue is
caught locally.
2026-06-08 11:59:32 +02:00
Nicolas Clerc 3e89881cca 🔥(backend) remove unused OnlyOffice conversion JWT options
ConvertJwtSecret, ConvertJwtRequired and the jwt_required constructor
guard were never configured in any environment.
2026-06-08 11:59:32 +02:00
Nicolas Clerc cbec3ba077 🌐(frontend) reuse download label for folder export action
As we want to use the same label for file download and folder export,
the same key is used, and the unused one is removed.
2026-06-08 10:48:40 +02:00
neilcroft 05754638ad 🐛(backend) sanitize slash in template-created filenames
Titles containing '/' (e.g. "30/03/30 - liste à faire") produced
a file_key with spurious path separators, crashing WOPI on open.

Extract `format_template_filename()` to replace '/' with '-' when
building the filename from a template title.

Closes #626
2026-06-04 11:26:58 +02:00
Nathan VasseandNicolas Clerc 43bc6ece92 (frontend) reuse clipboard permissions helper on firefox
The dropdown menu test was failing on firefox because
context.grantPermissions does not accept the clipboard-* strings
on that browser. Use the shared helper which skips firefox where
clipboard support is enabled at launch via firefoxUserPrefs.
2026-06-04 11:16:40 +02:00
Nathan VasseandNicolas Clerc f17d7a8e50 (frontend) test public folder CTAs
Cover the folder explorer header on a public folder: authenticated
users see no anonymous CTA; anonymous users see AnonymousCTA with
a login button that redirects to /authenticate/. A third case
exercises the anonymous dropdown menu — copy link writes the
folder URL to the clipboard, and switching language updates the
visible CTA text.
2026-06-04 11:16:40 +02:00
Nathan VasseandNicolas Clerc bdf6c293c3 (frontend) test public file preview CTAs
Cover the contextual CTAs on the standalone file preview page:
authenticated users get MyFilesCTA redirecting to /my-files, and
anonymous users get AnonymousCTA with the default "/" try-out
fallback plus a login button that redirects to /authenticate/.
A dedicated case mocks FRONTEND_EXTERNAL_HOME_URL to ensure the
try-out href follows the config.
2026-06-04 11:16:40 +02:00
Nathan VasseandNicolas Clerc 4adbe9f2b7 (frontend) wire CTAs into header and standalone file preview
UserProfile now renders AnonymousCTA along with a dropdown menu
(copy link, language picker) when no user is authenticated, so
visitors on a public page can still act on it without the user
menu. CustomFilesPreview gains a CONTEXTUAL mode that swaps in
the right CTA based on auth state, used by the standalone file
preview page which is now wrapped in GlobalLayout to expose the
auth context.
2026-06-04 11:16:40 +02:00
Nathan VasseandNicolas Clerc 82e57aefc5 (frontend) add AnonymousCTA and MyFilesCTA components
AnonymousCTA offers a try-out link and a sign-in button to visitors
landing on a public resource. MyFilesCTA is the authenticated
counterpart, sending the user back to their drive. Translations
cover both CTAs and the anonymous dropdown menu that will live next
to them. Components are consumed in a follow-up commit.
2026-06-04 11:16:40 +02:00
Nathan VasseandNicolas Clerc 3088455abf ⬆️(frontend) bump ui-kit to 0.22.0
Required for the DropdownMenu, useDropdownMenu and Folder exports
used by the upcoming anonymous and my-files CTA components.
2026-06-04 11:16:40 +02:00
Nicolas Clerc a4105a3432 (backend) allow grist file upload
The .grist extension was already in FILE_EXTENSIONS_ALLOWED but
upload failed at MIME type validation because python-magic detects
grist files as application/vnd.sqlite3.
2026-06-03 18:38:46 +02:00
Nicolas Clerc 7ac7dd5ef5 🐛(frontend) add missing export action translations
The folder export button added in cd7bebfc used
the translation key explorer.item.actions.export
without adding the corresponding entries.
2026-06-03 18:23:07 +02:00
Nicolas Clerc 302bff1605 (e2e) cover conversion explorer flow
The conversion flow crosses modal state, API calls, and explorer refreshes.

Cover the expected user path with a mocked conversion ability and placeholder
response.
2026-06-03 16:47:38 +02:00
Nicolas Clerc 4f85801abe ♻️(frontend) generalize duplicating poller to transient items
The same polling loop fits any transient upload state.

Rename the duplicating poller to a transient one driven by
TRANSIENT_UPLOAD_STATES so converting items are picked up without copying
the hook, and the explorer refreshes automatically when background
conversion finishes.
2026-06-03 16:47:38 +02:00
Nicolas Clerc aeb6c9b5c7 (frontend) render converting items as transient rows
A converting file is visible but not ready for normal file actions.

Show the transient state consistently and prevent opening or acting on the item
until conversion completes.
2026-06-03 16:47:38 +02:00
Nicolas Clerc af6ab74e42 (frontend) add conversion modal
Users should understand that opening a legacy file creates an editable copy.

Keep the modal focused on confirmation and let the folder show the ongoing
conversion state.
2026-06-03 16:47:38 +02:00
Nicolas Clerc 462c3e5e7a (frontend) wire conversion API client
The frontend needs to treat conversion as item creation rather than job polling.

Return the placeholder item from the driver so UI state stays aligned with the
explorer list.
2026-06-03 09:28:56 +02:00
Nicolas Clerc 6a07e183ce 🐛(backend) normalize WOPI extension lookup
Uploaded filenames preserve extension case, while WOPI discovery stores
extension keys in lowercase.

Normalize the lookup so legacy files like REPORT.DOC follow the same conversion
path.
2026-06-03 09:28:56 +02:00
Nicolas Clerc 10f5724951 (backend) queue legacy file conversion
Starting a conversion should be quick for the API caller and continue in the
background.

Queue the placeholder-backed conversion task from the item endpoint.
2026-06-03 09:28:56 +02:00
Nicolas Clerc acfd09be8f (backend) expose legacy conversion ability
The explorer needs to know when opening a legacy Office file should start
conversion instead of WOPI editing.

Expose the decision on item abilities so the frontend can keep the flow item-
based.
2026-06-02 15:23:42 +02:00
Nicolas Clerc 20596fa98a (backend) add placeholder-backed conversion service
Users need immediate feedback in the current folder while conversion continues
in the background.

Create the target item up front and complete it once converted bytes are
available.
2026-06-02 15:23:42 +02:00
Nicolas Clerc a67efc234b (backend) add converting upload state
Converted files should appear in the folder immediately while Celery is still
working.

Add a dedicated transient state instead of overloading upload or duplication
states.
2026-06-02 15:23:42 +02:00
Nicolas Clerc a997fa826f (backend) build short-lived WOPI source URLs
OnlyOffice must fetch the source bytes from Drive during server-side conversion.

Use short-lived WOPI access URLs so conversion does not depend on direct object
storage reachability.
2026-06-02 15:23:42 +02:00
Nicolas Clerc b4fc5ec2a3 (backend) add legacy conversion policy helpers
Legacy Office formats need an explicit conversion policy before they can be
opened for editing.

Keep the mapping small and configuration-driven so the backend only converts
formats intentionally forced by the WOPI client.
2026-06-02 15:23:42 +02:00