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
2020-01-05 01:20:08 +02:00
..
2019-12-22 08:29:26 +00:00
2019-08-23 12:40:29 -04:00
2019-06-12 15:41:28 -04:00
2019-09-24 21:22:39 +08:00
2019-12-27 20:30:58 +00:00
2019-12-27 20:30:58 +00:00
2019-12-15 16:57:34 -05:00
2020-01-02 07:54:22 +00:00
2019-10-17 11:26:49 +02:00
2019-12-15 11:06:31 +00:00
2019-11-11 23:15:29 +08:00
2019-12-15 11:06:31 +00:00
2019-10-17 11:26:49 +02:00
2019-06-12 15:41:28 -04:00
2019-10-17 11:26:49 +02:00
2019-08-23 12:40:29 -04:00
2019-06-12 15:41:28 -04:00
2019-06-12 15:41:28 -04:00
2018-10-20 18:19:21 -04:00