Skip to content

Commit

Permalink
fix(webdav): remove default doc, xls files
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Metzener <[email protected]>
  • Loading branch information
Yelinz and anehx committed May 30, 2024
1 parent 343a2ee commit 94df87f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 10 additions & 2 deletions alexandria/core/tests/test_dav.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,17 @@ def test_dav_file_infection(db, manabi, mocker, file_factory):
@pytest.mark.parametrize(
"use_manabi,mime_type,expected_status",
[
(True, "application/msword", HTTP_200_OK),
(
True,
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
HTTP_200_OK,
),
(True, "image/png", HTTP_404_NOT_FOUND),
(False, "application/msword", HTTP_404_NOT_FOUND),
(
False,
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
HTTP_404_NOT_FOUND,
),
],
)
def test_dav_view(
Expand Down
2 changes: 0 additions & 2 deletions alexandria/settings/alexandria.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ def default(default_dev=env.NOTSET, default_prod=env.NOTSET):
ALEXANDRIA_MANABI_ALLOWED_MIMETYPES = env.list(
"ALEXANDRIA_MANABI_ALLOWED_MIMETYPES",
default=[
"application/msword",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
],
)
Expand Down

0 comments on commit 94df87f

Please sign in to comment.