9 Commits (a6168fa25d0a7dfee689e1bce940557fff70d392)

Author SHA1 Message Date
silverwind 9d3e69e867
Move dropzone.js to npm/webpack (#10645)
- unvendor dropzone and upgrade it from 4.2.0 to 5.7.0
- make `csrf` available on window.config
4 years ago
6543 e57ac841de
Fix potential bugs (#10513)
* use e if it is an option
* potential nil so check err first
* check err first
* m == nil already checked
4 years ago
Antoine GIRARD 8b24073713 Only serve attachments when linked to issue/release and if accessible by user (#9340)
* test: add current attachement responses

* refactor: check if attachement is linked and accessible by user

* chore: clean TODO

* fix: typo attachement -> attachment

* revert un-needed go.sum change

* refactor: move models logic to models

* fix TestCreateIssueAttachment which was wrongly successful

* fix unit tests with unittype added

* fix unit tests with changes

* use a valid uuid format for pgsql int. test

* test: add unit test TestLinkedRepository

* refactor: allow uploader to access unlinked attachement

* add missing blank line

* refactor: move to a separate function repo.GetAttachment

* typo

* test: remove err test return

* refactor: use repo perm for access checking generally + 404 for all reject
5 years ago
blueworrybear 8c909820a9 Enable Uploading/Removing Attachments When Editing an Issue/Comment (#8426) 5 years ago
Antoine GIRARD f369788347 Refactor filetype is not allowed errors (#7309) 5 years ago
Lunny Xiao 09fb036ad6 fix upload attachments (#6481)
* fix upload attachments

* add migration for new column uploader_id on table attachment

* fix imports sequence
5 years ago
Mahmoud Al-Qudsi 171914e9a7 Log attachment blocked events (#3615)
Include both a log entry and the blocked mime type in the gitea log when
an attachment upload is blocked.

Chosen log level is info; this may need to be dialed down to trace.
6 years ago
Thomas Boerger 78535fb08e Allow custom public files (#782)
* Allow custom public files

* Gofmt code, lots of places not related to this pr
8 years ago
Philip Couling 1610b9f547 Spun attachments into seperate go file (#701)
Moved attachments into seperate go file
8 years ago