49 Commits
Author SHA1 Message Date
Nathan Vasse 8f47646dff (backend) apply per-audience attributes to external api items
External services consuming the resource server API may need items they
create to carry specific attributes, typically quota_excluded so their
uploads do not consume the user quota.

The new EXTERNAL_API_AUD_ITEM_ATTRIBUTES setting maps a token audience
to the attributes applied at creation. The lookup is a hook on the item
viewset overridden only in the resource server viewset, so both the
root create and children creation paths are covered while the regular
API remains unaffected.
2026-08-03 10:20:45 +02:00
Nathan Vasse 16f11c12e7 (backend) add an item batch share endpoint
Sharing a folder with many contacts one call at a time is slow and can
leave a partial state when one of them fails. This endpoint accepts a
list of email/role rows, validates them all before any write, then
creates accesses for known users and invitations for unknown emails.
Rows targeting users already covered by an equal or higher role are
skipped and reported so the client can inform the user.

The feature is disabled by default and gated by the new
ALLOW_SHARE_IMPORT_FILE setting exposed in the config endpoint.
2026-07-28 11:26:07 +02:00
Nathan Vasse 0f7ee3a3ed (backend) add a local entitlements backend with storage limits
Deployments without a DeployCenter service had no way to enforce
storage quotas. This backend computes each user's usage locally and
applies a configurable default limit, overridable per user in the
admin (0 meaning unlimited) and skippable for users created before a
cutoff so quotas can be rolled out to new users only. The quota is
soft: can_upload runs before the file size is known, so one upload
can overshoot before the next one is blocked.
2026-07-23 17:08:10 +02:00
Nicolas Clerc 722823cbad ♻️(settings) replace empty upload ACL with a "default" sentinel
An empty AWS_S3_UPLOAD_ACL in an env file is easy to mistake for
an unset variable, and unset must keep meaning "private". The
explicit "default" value states the intent: let the bucket's
default object ACL apply. The frontend translates it where the
config is read, so the drivers keep sending exactly the ACL they
are given.
2026-07-22 17:10:22 +02:00
Nicolas Clerc 8ba9d7b3f9 (backend) make the upload ACL configurable
GCS based storages like S3NS reject presigned PUT URLs signing the
x-amz-acl header: their S3 compatibility layer consumes x-amz-*
headers having an x-goog-* equivalent, so the signature check no
longer finds the header in the request. Objects are private by
default on S3 and GCS, so the ACL can simply be dropped by setting
AWS_S3_UPLOAD_ACL to an empty string. The setting is exposed in the
config endpoint so the frontend can send a header matching the
signature.

See https://documentation.s3ns.fr/storage/docs/aws-simple-migration
2026-07-22 16:02:04 +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
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 9995a2af30 📝(doc) document user account reconciliation
Explain the CSV import flow and the form URL setting so admins can run
account merges.
2026-05-27 17:36:47 +02:00
e35549707c (settings) Allow configuring PKCE for the SSO
Co-Authored-by: Tom Hubrecht <github@mail.hubrecht.ovh>
2026-04-30 08:15:46 +02:00
Nathan Vasse ba4558e1ca (backend) expose FRONTEND_ENTITLEMENTS_DISCLAIMERS config
Add a dict-shaped config exposed to the frontend so operators can
enable or disable entitlement disclaimers per reason without code
changes. Also pin the Test settings to the local entitlements backend
so test runs do not depend on external state.
2026-04-29 10:17:25 +02:00
Nathan Vasse aa099068e9 (backend) add organization metrics to usage API
Add account_type=organization support to the usage metrics
endpoint. When requested, the API filters users by a shared
OIDC claim (account_id_key/account_id_value) and returns
aggregated storage across all matching users.

Add handling of account_id_key/account_id_value pair, allowing
filtering on allowed parameters in a more generic way. At the
moment `account_email` filter is still needed.

Also include the context of the entitlement in the /entitlements
response.
2026-04-29 10:17:25 +02:00
Nathan Vasse 62b8341dd7 ♻️(backend) refactor entitlements into backend package
Restructure the entitlements module from flat files into a
backends/ package with a factory pattern. This enables
constructor kwargs injection for backend configuration.

Rename ANCT backend to DeployCenter to match the actual
service name, and rename Dummy backend to Static for clarity.
The factory now passes ENTITLEMENTS_BACKEND_PARAMETERS to
the backend constructor, making configuration more explicit
and testable.

Some request parameters get updated because of changes on
deploy center side that need to be reflected in services.
2026-04-29 10:17:25 +02:00
Manuel Raynaud 805ef77521 🔥(backend) remove mirroring feature
The mirroring feature was hard to maintain and not performant. We should
rely on external tools made for that like RClone.
2026-04-23 17:42:48 +02:00
Nathan Panchout 3731033f5b 🔧(project) add DJANGO_EMAIL_URL_APP environment variable
Share invitation emails embedded `Site.domain` directly, producing
schemeless links that mail clients failed to resolve. Introduce a
`DJANGO_EMAIL_URL_APP` environment variable holding the app's
absolute URL used when building invitation links, with a fallback
on the current Site domain when unset. Wire it in dev env, helm
dev values, the helm example and the env reference.
2026-04-23 12:05:26 +02:00
Nathan Vasse 352e19580e (backend) make invitation validity duration configurable via env
The invitation validity duration was hardcoded to 7 days. Expose it as
an INVITATION_VALIDITY_DURATION env var so operators can tune it per
deployment without patching settings. Default remains 7 days.
2026-04-22 10:09:31 +02:00
Nathan Panchout 3a730b87cf 📝(frontend) document explorer selection store architecture
Add an architecture doc covering the rationale behind the selection
store refactor: why React Context did not scale to 200+ rows during a
marquee drag, why useSyncExternalStore with per-id listeners enables
automatic bailout, and how global vs embedded scopes are wired.

Lives under docs/architecture/ for long-term reference.
2026-04-20 17:09:53 +02:00
Samuel Paccoud - DINUMandManuel Raynaud 573499efc4 (backend) allow purging items after trashbin cutoff and grace period
An item is considered hard deleted in two cases:
- hard deletion was forced by the user while sitting in the trashbin
- the item was only soft deleted but the trashbin retention period
  has expired

Thus, a hard deleted item still exists in database with an associated
file in S3. What the asynchronous task is doing is another action:
permanently removing the item from database and its associated file
from S3. I propose to rename this action "purge".

We refactor the task to improve its resilience:
- don't recursively generate asynchronous tasks. We are already
  outside of a request cycle so we don't need to spawn new
  asynchronous tasks.
- purge the subtree from the bottom to the top: leaves first,
  root last.
- fail fast if something goes wrong and make sure the task will
  continue when we retry it.
2026-04-10 12:32:46 +02:00
Nathan Vasse 2a419c9523 📝(other) add local network setup documentation
Documents how to access the dev environment from other
devices on the local network, useful for mobile testing.
2026-03-30 10:54:06 +02:00
Hadrien BlancandNathan Vasse 5e472506a6 📝(doc) fix various typos
Fix various typos in documentation and readme files.
2026-03-11 14:57:28 +01:00
Manuel Raynaud d9f806920a (backend) reject uploaded file higher than DATA_UPLOAD_MAX_MEMORY_SIZE
check in the upload_ended action if the file size is higher than
DATA_UPLOAD_MAX_MEMORY_SIZE and reject it if it's the case.
2026-02-25 10:52:19 +01:00
Nathan Vasse c89aa81d71 📝(doc) replace theming doc with customization guide
The new CSS and JS injection features needed documentation.
We merged the old theming doc into a broader customization
guide covering runtime CSS, JS injection, and footer config.
2026-02-23 16:35:07 +01:00
Nathan PanchoutandNathan Vasse 9bf7fa7109 (backend) add FRONTEND_RELEASE_NOTE_ENABLED feature flag
Add new parameter the allow the display of releases notes or not.
2026-02-12 09:54:52 +01:00
Manuel Raynaud 2065ffbbb8 ♻️(helm) configure multiple celery workers
We want to configure multiple celery workers. Every worker can be scale
differently and configured differently
2026-02-10 10:11:20 +01:00
Manuel Raynaud 7817cda27c (backend) allow configuring celery task routes
Add a CELERY_TASK_ROUTES setting to enable routing specific tasks
to dedicated queues, such as routing mirror_file to its own queue.
2026-02-10 10:11:19 +01:00
Manuel Raynaud 31d9be66b9 📝(doc) write documentation explaining how to migrate the bucket
Write a documentation explaining how to migrate a bucket from one cloud
provider to another one
2026-02-10 10:11:19 +01:00
Manuel Raynaud 1a2aebddcd 📝(docs) write documentation to setup mirror feature
Write the documentation needed to setup the mirror feature.
2026-02-10 10:07:57 +01:00
Manuel Raynaud 5a30a9840f (backend) implement mirror_file task
The mirror_file task is reponsible to copy an object from a bucket to an
other one. The buckets can be in different location, in different cloud
providers so we have to download it to reupload it. The `copy` method on
the s3 client only work when the bucket are in the cloud provider infra,
like for AWS.
2026-02-10 10:07:56 +01:00
Nathan Vasse b1ce2b110d (backend) add FRONTEND_EXTERNAL_HOME_URL setting
Add a new configuration option to define an external home URL. When set,
the frontend will redirect users to this URL instead of displaying the
default home page. This allows deployments to use a custom landing page.
2026-02-04 10:23:05 +01:00
Manuel Raynaud 46d61a9c76 🐛(backend) correctly configure celery beat to run wopi configuration
The celery beat configuration was not working correctly, we installed
the database scheduler but we didn't configure it correctly. We prefer
removing this scheduler to use the default one. Instead, the crontab
part can be configured using environment variable. By default it will be
run every night at 3AM.
2026-02-02 08:05:18 +01:00
Manuel Raynaud ca6cbacff3 🏗️(ds_proxy) introduce how to use ds_proxy with Drive
We want to add documentation showing how to use DS_Proxy with Drive.
With proxy is fully optionnal and is here if you want to an encryption
layer between Drive and the object storage.
2026-01-23 09:18:03 +01:00
Manuel Raynaud 3901e57cab (backend) add an allowed file mimetype list
Allong the allowed extension list we added an allowed mimetype list. We
combine both to ensure that the user is allowed to make the upload. If
the mimetype is not allowed, then the file and the item are deleted.
2026-01-09 10:43:56 +01:00
Manuel Raynaud d7eccd766f (backend) add an allowed file extension list
We want to limit what type of file can be uploaded. For this we use an
allowed list of file extension. This allowed list can be disabled using
a setting and this list is configurable using a setting. When enabled,
file with no extension and hidden file are also rejected.
2026-01-09 10:43:53 +01:00
Nathan Vasse 9f28cc61ac (back) add /users route to external api custom
We need to allow configuration of /users sub route via
the EXTERNAL_API configuration.
2025-12-18 16:13:07 +01:00
Fabre FlorianandQuentin BEY 03124f4bf1 (backend) add indexed search feature flag
Add setting FEATURES_INDEXED_SEARCH that allows to disable the
search of indexed files while using the indexation tools.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY a4307907e1 (backend) refactor indexer service
Replace "drive" by a SERVICE_NAME constant.
Merge search() & search_query() methods.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY 5492a68a99 (backend) enable limit for the indexed content
Use SEARCH_INDEXER_CONTENT_MAX_SIZE as limit (in bytes) for the file content.
Fix default configuration of OIDC_STORE_ACCESS_TOKEN

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY 63cfe37695 (backend) adapt to Find new search pagination & fixes
Use nb_results instead of page/page_size argument for /search API.
Add --batch-size argument to the index command.
Fix an issue in SearchIndexer.has_text when item.mimetype is empty.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY cad05aa4ff 🔧(compose) disable indexer in default configuration
Set SEARCH_INDEXER_CLASS=None as default configuration for dev.
Add documentation for Find service setup.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Nathan Vasse 9a86a5f46f (backend) enable full customization of external api
We have some instances that requires more open resource server features.
This change adds a setting that allows to cherry-pick
which api routes needs to be available or not.
2025-12-15 13:46:59 +01:00
Nathan Vasse 46fb46017d 📝(doc) add entitlement and metrics doc
Let's provide some useful informations about those two new
features.
2025-12-01 11:12:43 +01:00
Nathan Vasse ed9a0ada35 📝(docs) add some docs
Because we lack documentation, so let's add a bit.
2025-11-19 10:12:25 +01:00
Manuel RaynaudandNathan Panchout 248612178c 🔧(backend) use setting MAX_PAGE_SIZE to configure pagination
The pagination class Viewsets.Pagination has the max_page_size set to
200. We want to be able to configure this value using a setting. A new
one MAX_PAGE_SIZE is created for this. By default its value is 200 to
not change the current behavior.
2025-11-17 15:40:26 +01:00
Nathan Vasse 71bf56afd0 📝(doc) add resource server doc
Add some documentation and provide some examples of
requests.
2025-10-31 10:50:19 +01:00
Manuel Raynaud 9746ad519b 📝(doc) document how to install drive on k8s
We support installation on kubernets. This dopcumentation is here to
show how to deploy on a developement cluster in order to understand what
is needed to do it later in production.
2025-10-13 08:45:46 +02:00
Nathan Vasse 66eeac21f3 (back) add messages widget settings vars
We need those vars to allow customization for the feedback button
to opens the messages widget.
2025-09-29 16:27:33 +02:00
Manuel Raynaud 2cb5b715fd ♻️(front) use PUT method to upload files
We need to adapt the frontend code to use the PUT method to upload a
file instead of the POST method.
The headers used to sign the url must be added to the request sent. For
now the X-ams-acl header is used.
2025-09-24 09:31:17 +02:00
Manuel Raynaud 5866183724 📝(doc) list environment variable configurable
Create a documentation listing all environment variable that can be
configured in the project.
2025-06-27 16:34:21 +02:00
virgile-deville 922b1d1289 📝(doc) add image to showcase product in readme
So that people get a preview of the product's UI

Signed-off-by: virgile-deville <virgile.deville@beta.gouv.fr>
2025-05-23 08:47:55 +02:00
virgile-deville 56274655ee 📝(doc) improve readme
Added project description logo and screenshot

Signed-off-by: virgile-deville <virgile.deville@beta.gouv.fr>
2025-05-23 08:47:55 +02:00