mirror of
https://github.com/suitenumerique/drive.git
synced 2026-09-10 19:58:00 +02:00
DeployCenter now accepts the usage metrics directly in the entitlements request body, so we switch from GET to POST and send a "usage_metrics" list with the user's storage and the aggregated storage of the active users sharing the same organization claim. This avoids the extra HTTP roundtrip DeployCenter previously made to our usage metrics API when resolving entitlements. The entries reuse the Usage serializers so the pushed body and the pulled external API cannot drift. The organization serializer now takes the users queryset to be usable from both call sites, which also moves the storage computation out of the viewset. The organization claim key is configurable through a new "organization_claim" backend parameter defaulting to "siret".