Skip to content

Commit

Permalink
Use django-attachments for user uploaded files. Fixes #160
Browse files Browse the repository at this point in the history
- remove tcms/core/files.py
- remove now-unused home-grown attachment models
- remove related factories and update tests
- update templates
- update JavaScript files (remove unnecessary parts)
- update default permissions

As part of this change we no longer copy Plan and Case
attachments when cloning these objects.

NOTE: Since django-attachments introduces new permission objects
you will have to adjust default permissions for existing users.
In order for them to be able to upload/delete their own files they
need to have `attachments.add_attachment` and `atachments.delete_attachment`
permissions.

These same permissions are added by default to the 'Tester' group.
If you are running an existing installation registering a new user
with Kiwi TCMS will update the default permissions for this group!

Migrations for 'testcases':
    - Remove field attachment from testcaseattachment
    - Remove field case from testcaseattachment
    - Remove field case_run from testcaseattachment
    - Remove field attachment from testcase
    - Delete model TestCaseAttachment
Migrations for 'testplans':
    - Remove field attachment from testplanattachment
    - Remove field plan from testplanattachment
    - Remove field attachment from testplan
    - Delete model TestPlanAttachment
Migrations for 'management':
    - Remove field submitter from testattachment
    - Remove field attachment from testattachmentdata
    - Delete model TestAttachment
    - Delete model TestAttachmentData
  • Loading branch information
atodorov committed Dec 30, 2017
1 parent b769a54 commit 888ec97
Show file tree
Hide file tree
Showing 37 changed files with 170 additions and 842 deletions.
7 changes: 0 additions & 7 deletions docs/source/modules/tcms.core.files.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/modules/tcms.core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Submodules
tcms.core.context_processors
tcms.core.db
tcms.core.exceptions
tcms.core.files
tcms.core.managers
tcms.core.middleware
tcms.core.responses
Expand Down
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Django==2.0
django-attachments
django-uuslug
odfpy
python-bugzilla
Expand Down
237 changes: 0 additions & 237 deletions tcms/core/files.py

This file was deleted.

Loading

0 comments on commit 888ec97

Please sign in to comment.