Commit Graph
100 Commits
Author SHA1 Message Date
Manuel Raynaud 90a5dff1f9 ⬆️(dependencies) update urllib3 to v2.7.0 [SECURITY]
Update to patch CVE CVE-2026-44431 and CVE-2026-44432
2026-05-12 15:02:51 +02:00
Manuel Raynaud 9add4753d1 🔖(minor) bump release version 0.18.0
Added

- (backend) add organization metrics to usage API
- (backend) add entitlements context and can_upload reason
- (frontend) add entitlement disclaimer modal
- (frontend) render PDF previews at per-page dimensions

Fixed

- 🐛(backend) accept CDFV2 mimetype from newer libmagic
- 🐛(backend) better transaction management on duplicate action

Removed

- 🔥(backend) remove mirroring feature
2026-05-04 16:47:06 +02:00
Manuel Raynaud d6e27ba5a1 🔊(backend) log wopi max expected file size in get_file_content action
In the get_file_content action we want to log the received max expected
file size when this one is lower than the file size the user wants to
edit. This will help us to correctly configure the WOPI host.
2026-05-04 14:33:18 +02:00
Manuel Raynaud 68abb54dbb 🐛(backend) better transaction management on duplicate action
On the duplicate action we are using the decorator @transaction.atomic
to be sure that the duplicated item and its accesses are correctly
created. The problem with that is that the celery task doing the file
duplication on the object storage can be executed before the transaction
is commited leading to an error saying that the duplicated_item does not
exists.
2026-04-29 22:07:56 +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
Manuel Raynaud 3ca5b0e296 🔖(minor) bump release version 0.17.0
Added

- (backend) make invitation validity duration configurable via env var
- (frontend) enhance upload toast with progress, errors and cancel support
- (frontend) add ErrorIcon component and support numeric icon sizes
- (frontend) make file upload abortable in driver layer
- (frontend) files preview v2
- 🔧(project) add DJANGO_EMAIL_URL_APP environment variable

Fixed

- 🐛(frontend) add actions menu on mobile My Files page
- 🐛(frontend) show actual selection count in hard delete modal
- 🐛(frontend) Responsive broken with long filters in search #659
- 🐛(front) set size and variant on trash navigate modal #666
- 🐛(frontend) fix uploads continuing after parent folder deletion
- 🐛(frontend) fix SDK picker link reach promotion
- 🐛(backend) route share invitation link to file view for files
- 🐛(frontend) fix "+ New" menu in read-only folders and virtual tabs
- 🐛(frontend) range selection freezes when there are many items in the list
- 🐛(backend) fix openapi schema for item access endpoints
- 🐛(backend) load jwks url when OIDC_RS_PRIVATE_KEY_STR is set
2026-04-23 15:43:49 +02:00
Manuel Raynaud d120171944 🐛(backend) load jwks url when OIDC_RS_PRIVATE_KEY_STR is set
When the resource server is enabled and the backend used is
JWTResourceServerBackend, then the API should expose a JWKS endpoint
to share the RSA public key to the OIDC provider. Everything is made
in the Django LaSuite library, but the URL is not included in the
Drive URLs. This commit adds it when the setting OIDC_RS_PRIVATE_KEY_STR
is set.
2026-04-22 13:37:30 +02:00
Manuel Raynaud 504b58f2a5 🔖(minor) bump release version 0.16.0
Added

- (frontend) add PDF viewer with thumbnail sidebar, zoom and page navigation
- (frontend) integrate PDF viewer into file preview modal
- 📝(doc) add local network setup documentation
- (global) add custom columns feature with configurable grid columns
- 🔒️(frontend) prevent search engine indexing
- (backend) allow ordering items by creator full name
- (frontend) add item duplication with polling and visual feedback
- (ci) shard e2e tests and cache playwright browsers
- ⬆️(frontend) upgrade cunningham-react and ui-kit to 0.20.0
- (frontend) improve custom columns with sortable config and i18n

Changed

- 🏷️(sdk) update Item interface by adding url_permalink
- 🔧(backend) allow extra CSRF origins via env variable
- 🔧(nginx) serve .mjs files with correct MIME type

Fixed

- 🐛(backend) fix hard delete of files created by other users
- 🐛(backend) handle race condition on concurrent LinkTrace creation
- 🐛(frontend) fix React SVG attributes in AddFolderButton
- 🔧(scalingo) compile translation files at deploy time
- 🐛(frontend) fix trash items not refreshing after hard delete
- 🐛(frontend) show modal when clicking files in trash
- 🐛(frontend) fix toasts appearing above modals
2026-04-09 11:49:27 +02:00
Manuel Raynaud b6275a4278 (backend) prefix duplicated item with Copy of
We want to prefix a duplicated item with the string Copy of.
2026-04-08 13:57:33 +02:00
Manuel Raynaud ab3a0ac66d (backend) create a dedicated ordering filter for the ItemViewset
We added a dedicated Ordering filter dedicated to the ItemViewset. On
this viewset we want to add an extra ordering if this one is not present
in order to have consistent ordering if the front order by title for
example and two title are equal.
2026-04-02 12:15:30 +02:00
Manuel Raynaud 5a7b047bd2 (backend) allow ordering items on recents and favorite endpoints
We want to enable the same ordering used on the view list on the recent
and favorite_list endpoints.
2026-04-01 14:48:48 +02:00
Manuel Raynaud 1441b4fc07 (backend) allow ordering items by creator full name
We want to order the item list by creator full_name. To ensure the
number of queries made is stable we assert it using
django_assert_num_queries
2026-04-01 14:48:39 +02:00
Manuel RaynaudandNathan Panchout 43db92428a (backend) allow ordering by size
We want to order the items by their size
2026-03-31 11:13:24 +02:00
Manuel RaynaudandNathan Panchout e6b2dab5c0 ♻️(backend) custom pydantic errors to be compatible with our handler
We are using the drf_standardized_errors handler to have "nice" errors
for the frontend application. We decided to override the SchemaField
from the django_pydantic_field library in order to make it compatible
with this error handler.
2026-03-31 11:13:24 +02:00
Manuel RaynaudandNathan Panchout b3b113ae74 (backend) add column_preferences column to user model
We want to store in the user model the column_preferences parameters.
These parameters are saved by the front application. In order to
validate it, we use pydantic BaseModel and store it in a json field
2026-03-31 11:13:24 +02:00
Manuel RaynaudandNathan Panchout 5f31c97af6 (backend) install pydantic and django-pydantic-field to strengthen API
Super useful for validation when handling unstructured dictionaries.

Follow qbey's recommendation and align with the
suitenumerique/conversation project approach to improve schema
validation and data integrity.
2026-03-31 11:13:24 +02:00
Manuel Raynaud 2fc865e0f6 ⬆️(ds-proxy) upgrade ds-proxy to version 2.0.0-alpha.4
To upgrade to the version 2.0.0-alpha.4, the salt is moved to the
keyring
2026-03-27 10:32:56 +01:00
Manuel Raynaud f09d6d15a9 (backend) new action to duplicate a file item
A user with at leat editor role, connected can duplicate a file item
which has its upload_state ready. The duplicate_file task is used to do
the copy of the file on the storage.
2026-03-20 13:30:51 +01:00
Manuel Raynaud 238d6eb92e (backend) add a task to duplicate a file
We plan to add an action to duplicate an item. We want to use a celery
task to make the copy using the s3 client. The task is retried 10 times
if failing and then the item is deleted if the copy fail after 10
retriees.
2026-03-20 13:30:51 +01:00
Manuel Raynaud b91c2d1777 🛂(backend) add duplicate in the item abilities
In order to add in next commit a duplicate action in the ItemViewset, we
add a `duplicate` entry in the item abilities. A user can duplicate a
file if he can update it.
2026-03-20 13:30:51 +01:00
Manuel Raynaud 1bb2c556fc 🔖(minor) bump release version 0.15.0
Added

- 🌐(frontend) update Dutch translation for create label
- (frontend) add create folder and import file actions
- 🐛(frontend) add action menu to mobile breadcrumbs
- 🐛(frontend) app stabilization

Changed

- ️(CI) optimize Docker Hub workflow
- ♻️(frontend) replace WorkspaceIcon with FolderIcon in breadcrumbs
- (backend) exclude pending items from listing views
- (frontend) scale upload progress to 90% before completion

Fixed

- 🐛(backend) allow inviting external person on item with no direct access
- 🐛(backend) stop storing numchild in database use annotation instead
- 🐛(backend) sanitize filename to be compatible with filesystems

Removed

- 🔥(backend) remove unused ServerToServerAuthentication backend
2026-03-16 11:58:34 +01:00
Manuel Raynaud b84a640cc1 🔧(backend) allow uploading mindmap manager files
Allow the upload of file of type mindmap manager using the extension
.mmap
2026-03-12 18:03:42 +01:00
Manuel Raynaud d924b47887 🐛(backend) sanitize filename to be compatible with filesystems
Filename were used as it, provided by the user. We want to force
sanitization on them to ensure they will be always compatible with
filesystems.
2026-03-05 16:25:45 +01:00
Manuel Raynaud c445215e91 ⬆️(backend) upgrade joserfc to version 1.6.3
Upgrade joserfc to version 1.6.3 in order to fic the
CVE-2026-27932
2026-03-05 14:27:51 +01:00
Manuel Raynaud d406bf5f47 ⬆️(upgrade django to version 5.2.12
Upgrade django to version 5.2.12 in order to fix the
CVE-2026-25673
2026-03-05 14:22:22 +01:00
Manuel Raynaud 725bf12564 🐛(backend) stop storing numchild in database use annotation instead
In the item model the properties numchild and numchild_folder must be
maintain by doing a +/- 1 operation in several actions. Maintaining is
error prone, hard to catch and can have lot of root cause we can't
identified. We choose to use annotation instead and to compute the value
when needed.
2026-03-05 14:16:22 +01:00
Manuel Raynaud bd44d4aab8 🐛(backend) allow inviting external person on item with no direct access
When a user with priviledged role on an item but inherited he can not
invite external person. We refacto the invitation viewset, serializer
and permission to check roles against all the tree.
2026-03-03 14:46:54 +01:00
Manuel Raynaud a19d70cb4e 🔥(backend) remove unused ServerToServerAuthentication backend
The backend ServerToServerAuthentication is not used in the application
and will not be used. We decided to remove it.
2026-03-03 14:18:21 +01:00
Manuel Raynaud e688fd130e 🔧(helm) add missing default probes configuration
For the backend probes, some default value are missing. We need to add
the periodSeconds, timeoutSeconds and the failureThreshold
2026-02-27 08:33:50 +01:00
Manuel Raynaud 564822d31f ️(CI) optimize Docker Hub workflow
We use the Docker Hub Workflow to build and push
our images to Docker Hub, but to check if we
have vulnerabilities in our images as well.
When we are just checking for vulnerabilities,
we don't need to do all the builing steps.
This commit optimizes the workflow by only doing the
necessary steps when we are just checking for
vulnerabilities, so during pull requests we skip the build
steps, and we do not activate QEMU and buildx
2026-02-26 09:19:43 +01:00
Manuel Raynaud add66377a9 🔖(minor) bump release version 0.14.0
Added

- 👷(docker) add arm64 platform support for image builds
- (global) add create file from template feature
- (global) add FRONTEND_CSS_URL and FRONTEND_JS_URL settings
- (backend) add a download action returning the media url
- (frontend) add right click feature
- (backend) allow customization of wopi parameters
- (backend) expose DATA_UPLOAD_MAX_MEMORY_SIZE in the config endpoint
- (frontend) stop upload if file higher than DATA_UPLOAD_MAX_MEMORY_SIZE
- (backend) reject uploaded file higher than DATA_UPLOAD_MAX_MEMORY_SIZE

Changed

- (backend) allow root item creation on the external API by default
- ♻️(backend) set item read only in the mirror item admin detail

Fixed

- (frontend) sync backend user language to browser on load
- 🐛(backend) fix WOPI PutFile to check stored file size
- 🐛(frontend) fix 401 page infinite redirect loop after login
- 🐛(backend) fix OIDC redirect allowed hosts format in dev config
- 🐛(global) update ui when renaming file from wopi editor
- 🐛(frontend) fix clipboard copy-paste in WOPI editor iframe
2026-02-25 15:47:55 +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
Manuel Raynaud 4bfff61878 (frontend) stop upload if file higher than DATA_UPLOAD_MAX_MEMORY_SIZE
We want to block the upload before it is started by checking if the file
size is higher than the exposed settings DATA_UPLOAD_MAX_MEMORY_SIZE
2026-02-25 10:52:19 +01:00
Manuel Raynaud 49f39d752f (backend) expose DATA_UPLOAD_MAX_MEMORY_SIZE in the config endpoint
We want to expose the DATA_UPLOAD_MAX_MEMORY_SIZE to the frontend
application in order to use it to check the file size that will be
uploaded.
2026-02-25 10:52:12 +01:00
Manuel Raynaud eb7da4fe9f (backend) expose a url_permalink property in the Item serializer
To not have to compute the download url, we decided to add a new
property url_permalink, this property will have the download action url
set in it when available.
2026-02-24 15:30:52 +01:00
Manuel Raynaud 4e5aefce27 (backend) add a download action returning the media url
The media url is subject to change if the file is renamed. If someone is
using it as a permalink, it will lose the ability to download the file.
We created a new download action, always returning a redirection to the
media url.
2026-02-24 15:30:51 +01:00
Manuel Raynaud d9a05cb948 🔧(helm) allow to configure more probes for every deployment
In the probes some parameters like periodSeconds or failureThreshold
were not configurable. We want allow their configuration
2026-02-24 08:52:25 +01:00
Manuel Raynaud c922102ed9 ♻️(backend) set item read only in the mirror item admin detail
There is no readon to change the item in the mirror item task in the
detail view. So we set it in the readonly_fields
2026-02-23 16:20:24 +01:00
Manuel Raynaud 7c7c0d7299 🔖(minor) bump release version 0.13.0
Added

- (backend) allow configuring celery task routes via `CELERY_TASK_ROUTES`
- (global) implement advanced shared management system
- (global) add release notes
- (front) show root page in breadcrumbs when navigating
- (front) filter recent items to only show files

Changed

- 🚸(oidc) ignore case when fallback on email #535

Fixed

- 🐛(backend) manage ole2 compound document format
- ♻️(backend) increase user short_name field length
- 🐛(helm) reverse liveness and readiness for backend deployment

Removed

- 🔥(global) remove notion of workspace
- ⚰️(scalingo) remove scalingo pgdump
2026-02-18 14:18:35 +01:00
Manuel Raynaud 58e88b90fd 🐛(helm) set schedule directory to /tmp
For celery beat deployment, we have to use a directory allowing write
permission to allow the scheduler to write its configuration. We use the
--schedule option to the /tmp repo.
2026-02-16 11:33:48 +01:00
Manuel Raynaud fcbd558bec 🔧(backend) allow text/x-tex mimetype
The text/x-tex mimetype is used by .tex files containing LaTeX document.
The application/x-tex is already allowed but we also have to allow this
mimetype otherwise some document with the .tex extension can't be
uploaded.
2026-02-16 11:02:26 +01:00
Manuel Raynaud dfd6d1f004 🔧(backend) allow application/zed mimetype
The extesion .zed is allowed but not the corresponding mimetype
application/zed
2026-02-16 11:02:26 +01:00
Manuel Raynaud 600b28825d 🔧(docker) maintain a custom mime.types file
We want to add entries in the /etc/mime/types to add mapping between
extension and mimetype allowed in Drive
2026-02-16 11:02:25 +01:00
Manuel Raynaud 50e19c9eae ⬆️(backend) upgrade pillow to version 12.1.1
We need to upgrade pillow library to fix CVE CVE-2026-25990
2026-02-13 10:22:25 +01:00
Manuel Raynaud 136d94ec80 🐛(helm) reverse liveness and readiness for backend deployment
The liveness and readiness are reversed. The liveness was using the
heartbeat process that is cheking all django checks and the database
connection.
2026-02-13 09:59:32 +01:00
Manuel Raynaud 5b3ab40d1e 🔧(front) remove server info in nginx config
In the nginx config, the server_tokens directive is not set to False
giving information like the nginx version. We have to set it to false.
2026-02-12 10:43:33 +01:00
Manuel Raynaud aa5efc371c ⬆️(backend) upgrade cryptography to version 46.0.5
upgrade cryptography to fix CVE-2026-26007
2026-02-11 14:54:50 +01:00
Manuel Raynaud 5c2a2eb957 🔧(docker) change mime.types url in Dockerfile
Change mime.types url in Dockerfile
2026-02-11 13:39:34 +01:00
Manuel Raynaud eef5cc598c ⬆️(helm) upgrade chart to version 0.13.0-beta.1
Prepare next version, release a new helm version 0.13.0-beta.1
2026-02-10 10:38:42 +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 ba73c4aa6a (backend) add a management command processing mirror task in pending
Add a management command processing mirror task in pending task. The
number of processed task is limited with the --batch-size option and has
a default value to 100. This management command should be run
periodically like a cron to enqueue the pending tasks.
2026-02-10 10:11:19 +01:00
Manuel Raynaud 123f3deac4 (backend) add management command to prepare mirroring existing items
We need a management command adding in the mirror_item_task table
existing items that needs to be mirror. It look for all the items of
type files, not present already in the mirror_item_task table and then
insert them by batch of 100 in the table.
2026-02-10 10:11:18 +01:00
Manuel Raynaud af6bd44569 (backend) add admin to manage MirrorItemTask model
We want to have the information in the admin about the MirrorItemTask
records, filter them by status. An action is added to force triggering
the task again for a given record.
2026-02-10 10:11:18 +01:00
Manuel Raynaud e2d6d4e775 (backend) implement retry mechanism for the file mirror task
We implement a custom retry mechanism for the mirror file celery task.
We catch all boto3 exceptions, retrying 10 times and after the task is
stopped changing its status in failed and also the reason why it failed.
2026-02-10 10:11:18 +01:00
Manuel Raynaud 0b4326aa8f ♻️(backend) save item to mirror in the database
In order to be more fault tolerant, to not lose data if the redis is
reset, etc. We decided to put the item to mirror in a new table and then
the task will manage the status in the database.
This is the first step to then add tasks in the admin to retry or check
why the task has failed and also implement a retry strategy.

The Dockerfile must also be modified, we need the libmagic library to
build the image at the collect stage because the magic module is
imported in the storage module and all tasks are imported when the
application starts.
2026-02-10 10:11:18 +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 b706b54000 (backend) call mirror_file task in upload_ended viewset
when an upload is ended, we have to call the mirror_file task. The
upload is made in the client browser so we can't use the S3 storage
class dedicated to the mirroring.
2026-02-10 10:07:56 +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
Manuel Raynaud 5bd9859b2c (backend) create a storage mirroring files on s3
We want to save a file on an other s3 bucket. For this we created a
dedicated storage inheriting from the S3Storage. This storage only
dispatch a message in a celery task. The logic of mirroring will be
implemented in this task in order to do it in an async way.
2026-02-10 10:07:56 +01:00
Manuel Raynaud c048f9f7ed ♻️(backend) remove usage of boto3 put_object method
We don't want to use the s3_client anymore but to rely on the django
storages API. This first step will allow us to create a dedicated
backend for mirroring file saving.
2026-02-10 10:07:55 +01:00
Manuel Raynaud 5106f34a90 ♻️(backend) increase user short_name field length
The user's short_name field length was set to 20. This is not enought
and we have some users who cannot register because of that. We changed
this length to a higher one, 100, like the full_name.
2026-02-09 18:10:03 +01:00
Manuel Raynaud 0c7c381eb7 🐛(backend) manage ole2 compound document format
Microsoft has a generic format for files like .xls .doc .ppt and the
mimetype returned is application/x-ole-storage. We want to add it to
generic type list in order to use the extension instead.
2026-02-09 10:44:09 +01:00
Manuel Raynaud ef1c0ae3de 🐛(backend) filter link_traces restricted in the get_queryset method
Since the link_reach is inherited and not set on every items, we can't
filter anymore, in the ItemViewset.get_queryset method directly on the
link_reach column, we must have the computed_link_reach. We introduce a
bug on the item list methods because too much link_traces record were
return. We have to remove the link_traces related to a restricted items.
2026-02-06 15:58:21 +01:00
Manuel Raynaud 1c6286fd45 🔧(helm) allow to disable celery beat
We want to make celery deployment optional. By default, it is enabled.
2026-02-06 15:58:20 +01:00
Manuel Raynaud 6089c7bfcc ♻️(helmfile) rename helmfile
Rename helmfile to helmfile.yaml.gotmpl to be compatible with helmfile
0.162 and 1.1.9
2026-02-06 15:58:20 +01:00
Manuel Raynaud 24a336b1cd 🔧(nginx) change front path to use hyphen instead of underscore
We have unified the front pages to use hyphen separator instead of
underscore.
2026-02-06 15:58:20 +01:00
Manuel Raynaud 6899f02e8d ♻️(backend) force link_reach to be in sync with parents
For the same reason we not create an access when a child is created, we
have to not set value to link_reach allowing null value. A root will
have the link_reach set to restricted when created and then every
children are set to null. when the link_configuration will be updated,
descendants will be sync when the new link_reach is higher than the
previous one. Also move scenarios are impacted. When moving to the root,
we force the link_reach to restricted and when moving in an existing
item, we sync it with parents.
2026-02-06 15:58:19 +01:00
Manuel Raynaud dcad21f1d1 🔧(docker) configure new location for recent, my_files and favorites
The frontend has new pages. We have to create the corresponding location
block in the nginx configuration to handle them correctly.
2026-02-06 15:58:19 +01:00
Manuel Raynaud dad6e1cb12 ♻️(backend) change max_ancestors_role for inherited in access list
Once all accesses filtered, we need to check it we have to change the
max_ancestors_role for accesses that are inherited. An inherited access is will
not have the same item_id than the current item used in this viewset. In that
case, we use the role of the current access and the item_id it is related to.
2026-02-06 15:58:18 +01:00
Manuel Raynaud f0f894023b 📌(backend) pin django-ltree to version 0.6.0
We don't need anymore to rely on our fork of django-ltree, they have
integrated in the upstream repo all the modification we made.
2026-02-06 15:39:36 +01:00
Manuel Raynaud ade523c32f (backend) add tests validating computed_link_(reach|role)
Tests were missing for validating the computed_link_(reach|role) value.
The function computing it is already tested in django-lasuite package.
2026-02-06 15:39:35 +01:00
Manuel Raynaud e4c8e06292 ️(backend) avoid N+1 queries to compute link reach/role
To compute the abilities, the current item mu be aware of ancestors
link_reach and link_role. On the recents and favorite_list view if we
want to avoid N+1 queries we have to compute it for each deepest items
present in the final queryset, compute the ancestors link_definition and
then add it in the serializer. We added a new parameter to the
`get_response_for_queryset` method allowing to do this job.
2026-02-06 15:39:35 +01:00
Manuel Raynaud 7e6d7023ef 🐛(backend) fix set_to_role on non explicit access
On a non explicit access, when the set_to_role is computed and there is
no ancestors_role, we must use the current role as max role.
2026-02-06 15:39:31 +01:00
Manuel Raynaud 0814bab36f ♻️(backend) returned the item on the favorite endpoint
On the favorite endpoint the item was not returned. To ease building a
better cache for the frontend application, we return it now.
2026-02-06 15:39:31 +01:00
Manuel Raynaud b5e4872abc ♻️(backend) remove specific type filtering on search endpoint
The type filtering on the search endpoint was adding a workspace type to
filter only on top level folders and the the type folder was filtering
on the folder in depth. This behavior is not relevant anymore and all
this part can be deleted.
2026-02-06 15:39:30 +01:00
Manuel Raynaud 45989c725c 🔥(backend) stop creating a default workspace on user creation
We don't want anymore to create a default main workspace when a user is
created. All code related to this workspace creation is deleted.
2026-02-06 15:39:30 +01:00
Manuel Raynaud 1487424488 ️(backend) remove main_workspace on /me endpoint
We added the user main workspace on the /me endpoint. This is useless,
we want now unifiy the list view mixing all top level items available
for the user.
2026-02-06 15:39:30 +01:00
Manuel Raynaud b57bfd214e ️(backend) reintroduce type filtering on /items
The filtering by type was removed because it was only possible to list
folders. We need again to filter this endpoint by type
2026-02-06 15:39:29 +01:00
Manuel Raynaud 7b18dafacd ️(backend) remove filter by workspace on /items and keep main workspace
Previously on the /items list endpoint, the main_workspace was removed,
only folders were also present and it was possible to filter by
workspace type (shared or public). We decided to revert all these
changes.
2026-02-06 15:39:29 +01:00
Manuel Raynaud a76698cad3 ️(backend) reduce queries made in item access list viewset
The ItemAvvessViewset list endpoint is really complicated and half of
the algo is made to cache the role the current user have on the tree.
This code is now removed and replaced by a queryset annotation allowing
to fetch the user_roles and then determine in the model the max role the
user have on the tree. It reduces the number of sql query by 1 and ease
the code comprehension
2026-02-06 15:39:29 +01:00
Manuel Raynaud 8cfa413d22 ♻️(backend) limit accesses list to the last access for a user
We don't need the whole accesses list for all the users on the list
endpoint. We want to return the last access, meaning the access
on the deepest item in the items tree.
2026-02-06 15:39:29 +01:00
Manuel Raynaud ff831e0404 (backend) add the id of the max anestor role item in the access
For a given access we are able to compute the max ancestors role. We
also need the item_id related to this max_ancestors_role. We compute it
both in the vewset and in the models like we already did for the
max_ancestors_role
2026-02-06 15:39:28 +01:00
Manuel Raynaud 7f8befd2ab ♻️(backend) sync accesses if updated role == max_ancestors_role
When an access role is updated and the new role is equal to the access
max_ancestors_role, we want to resync accesses. For this, the current
access is deleted instead of updating it. We don't want to have 2
explicits accesses sharing the same role.
2026-02-06 15:39:28 +01:00
Manuel Raynaud db4e6afc49 ♻️(backend) set_role_to min role to max_ancestors_role for is_explicit
The set_role_to was computed to have only roles strictly higher than the
max_ancestors_role. We want this behavior only for inherited accesses.
When the role is explicit, we want to allow the lower role in
set_role_to equal to max_ancestors_role
2026-02-06 15:39:28 +01:00
Manuel Raynaud a348c70708 (backend) add is_explicit field on ItemAccessSerializer
We need to know, for a given if the related access is explicit or
inherited. This is usefull on the list endpoint. This endpoint returns
the entire list of accesses add on the entire tree, we need to know when
retrieving this list if each access is explicit on the item or
inherited.
2026-02-06 15:39:27 +01:00
Manuel Raynaud f54fc1f660 ♻️(backend) limit accesses list to the two last accesses for a user
We don't need the whole accesses list for all the users on the list
endpoint. We want to return the last two accesses, meaning the accesses
on the two items the deepest in the items tree.
2026-02-06 15:39:27 +01:00
Manuel Raynaud 52f11e20cc (backend) allow updating link configuration for an item
We open a specific endpoint to update items link configuration
because it makes it more secure and simple to limit access rights
to administrators/owners whereas other item fields like title
can be edited by anonymous or authenticated users with
much less access rights.
2026-02-06 15:39:27 +01:00
Manuel Raynaud 0bd8c67b67 (backend) syncronize descendants accesses on update or creation
When an access is created or updated, we want to syncronize descendants
accesses to remove ones with lower or equal roles.
2026-02-06 15:39:27 +01:00
Manuel Raynaud 5c53916f0c (backend) check updated access role is higher than previous explicit
Ensure that it is not possible to set a role lower than existing on
other accesses preset higher in the hierarchy tree.
2026-02-06 15:39:26 +01:00
Manuel Raynaud 11265f0280 (backend) validate role priority on new explicit access creation
when an explicit access is creating and an other explicit access exists
higher in the tree, then we must validate the role and ensure this new
role is strictly higher than previous explicit accesses.
2026-02-06 15:39:26 +01:00
Manuel Raynaud 45a19908bc (backend) compute max_ancestors_role in ItemAccess if not present
The max_ancestors_role was only computes in the ItemAccessViewSet.list
method to avoid having to compute it multiple times in the list and then
in the serializer. The result is save in the model instance has a cache,
but if not present whe computing the abilities outside the list method,
then the expected abilities are wrong. The set_role_to can't be computed
without it. So we search for the max_ancestors_role in the class itself
if not set.
2026-02-06 15:39:26 +01:00
Manuel Raynaud f696568e6c ♻️(backend) manage role inheritence for item accesses
We need to manage inheritence on item accesses. We backport all the work
made on the docs project. To list accesses, we look for all accesses on
all the item ancestors and the item itself.
2026-02-06 15:39:26 +01:00
Manuel Raynaud c39b93a2ac ♻️(backend) remove BaseAccess model
The BaseAccess model was only used by the ItemAccess model. We remove it
in order to refactor later the get_abilities method.
2026-02-06 15:39:25 +01:00
Manuel Raynaud dca39e3c76 ♻️(backend) refactor resource access viewset
The itemAccessViewset.get_queryset was the one used by the, now removed,
ResourceAccessViewsetMixin. We don't need it's complexity anymore and it
can be refactor to be clearer. The list function is added in order to
complexify it later.
2026-02-06 15:39:25 +01:00
Manuel Raynaud 3793f005de (backend) fix randomly failing test due to delay before check
There is a delay between the time the signature is issued and the
time it is checked. Although this delay is minimal, if the signature
is issued at the end of a second, both timestamps can differ of 1s.
2026-02-06 15:39:25 +01:00
Manuel Raynaud d78876bf9c ♻️(backend) simplify permissions and serializers
Some permissions were made in the BaseAccessSerializer. Permissions
should not occur in serializers. We refactor this, moving permission
check in permissions classes but also in the ItemAccessViewset. Also,
there is no need to keep the BaseAccessPermission
2026-02-06 15:39:24 +01:00
Manuel Raynaud 34da8e7f25 ♻️(backend) remove ResourceAccessViewsetMixin
Onlyt the ItemAccessViewset was using it, we remove it and copy in the
ItemAccessViewset all the methods.
2026-02-06 15:39:24 +01:00
Manuel Raynaud e0948905fc ♻️(backend) factorize item query set annotation
The methods to annotate an item queryset were factorized on the
viewset but the correct place is the custom queryset itself now that
we have one.
2026-02-06 15:39:24 +01:00