Compare commits

...

2 Commits

Author SHA1 Message Date
Anthony LC
5e8dc8f6b3 🔖(patch) release 3.8.21
Changed
♻️(backend) increase user short_name field length

Fixed
🐛(frontend) fix duplicate document entries in grid
🐛(frontend) show full nested doc names with ajustable bar
🐛(backend) fix trashbin list
2025-10-23 00:03:39 +02:00
Anthony LC
a714d5da4c 🐛(backend) fix trashbin list
Fix listing of deleted documents in trashbin for
users without owner access
2025-10-23 00:03:38 +02:00
13 changed files with 38 additions and 11 deletions

View File

@@ -14,6 +14,7 @@ and this project adheres to
- 🐛(frontend) fix duplicate document entries in grid #1479
- 🐛(frontend) show full nested doc names with ajustable bar #1456
- 🐛(backend) fix trashbin list
## [3.8.2] - 2025-10-17

View File

@@ -636,6 +636,9 @@ class DocumentViewSet(
.values_list("document__path", flat=True)
)
if not access_documents_paths:
return self.get_response_for_queryset(self.queryset.none())
children_clause = db.Q()
for path in access_documents_paths:
children_clause |= db.Q(path__startswith=path)

View File

@@ -293,3 +293,26 @@ def test_api_documents_trashbin_distinct():
content = response.json()
assert len(content["results"]) == 1
assert content["results"][0]["id"] == str(document.id)
def test_api_documents_trashbin_empty_queryset_bug():
"""
Test that users with no owner role don't see documents.
"""
# Create a new user with no owner access to any document
new_user = factories.UserFactory()
client = APIClient()
client.force_login(new_user)
# Create some deleted documents owned by other users
other_user = factories.UserFactory()
factories.DocumentFactory(users=[(other_user, "owner")], deleted_at=timezone.now())
factories.DocumentFactory(users=[(other_user, "owner")], deleted_at=timezone.now())
factories.DocumentFactory(users=[(other_user, "owner")], deleted_at=timezone.now())
response = client.get("/api/v1.0/documents/trashbin/")
assert response.status_code == 200
content = response.json()
assert content["count"] == 0
assert len(content["results"]) == 0

View File

@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "impress"
version = "3.8.2"
version = "3.8.21"
authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }]
classifiers = [
"Development Status :: 5 - Production/Stable",

View File

@@ -1,6 +1,6 @@
{
"name": "app-e2e",
"version": "3.8.2",
"version": "3.8.21",
"repository": "https://github.com/suitenumerique/docs",
"author": "DINUM",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "app-impress",
"version": "3.8.2",
"version": "3.8.21",
"repository": "https://github.com/suitenumerique/docs",
"author": "DINUM",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "impress",
"version": "3.8.2",
"version": "3.8.21",
"private": true,
"repository": "https://github.com/suitenumerique/docs",
"author": "DINUM",

View File

@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-docs",
"version": "3.8.2",
"version": "3.8.21",
"repository": "https://github.com/suitenumerique/docs",
"author": "DINUM",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "packages-i18n",
"version": "3.8.2",
"version": "3.8.21",
"repository": "https://github.com/suitenumerique/docs",
"author": "DINUM",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "server-y-provider",
"version": "3.8.2",
"version": "3.8.21",
"description": "Y.js provider for docs",
"repository": "https://github.com/suitenumerique/docs",
"license": "MIT",

View File

@@ -1,10 +1,10 @@
environments:
dev:
values:
- version: 3.8.2
- version: 3.8.21
feature:
values:
- version: 3.8.2
- version: 3.8.21
feature: ci
domain: example.com
imageTag: demo

View File

@@ -1,5 +1,5 @@
apiVersion: v2
type: application
name: docs
version: 3.8.2
version: 3.8.21
appVersion: latest

View File

@@ -1,6 +1,6 @@
{
"name": "mail_mjml",
"version": "3.8.2",
"version": "3.8.21",
"description": "An util to generate html and text django's templates from mjml templates",
"type": "module",
"dependencies": {