diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2020-01-05 00:20:08 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2020-01-05 01:20:08 +0200 |
commit | 8b2407371365fc123fc368bfd46b15f55ba8ae6a (patch) | |
tree | 8f112acce97c863846a88a6b37e3b570062860d2 /models/fixtures/repo_unit.yml | |
parent | 6a5a2f493a2b8d19a9f6196bd208a3b8a14e9c1c (diff) | |
download | gitea-8b2407371365fc123fc368bfd46b15f55ba8ae6a.tar.gz gitea-8b2407371365fc123fc368bfd46b15f55ba8ae6a.zip |
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
Diffstat (limited to 'models/fixtures/repo_unit.yml')
-rw-r--r-- | models/fixtures/repo_unit.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/fixtures/repo_unit.yml b/models/fixtures/repo_unit.yml index f7522d3031..5ced38b003 100644 --- a/models/fixtures/repo_unit.yml +++ b/models/fixtures/repo_unit.yml @@ -472,4 +472,10 @@ repo_id: 48 type: 7 config: "{\"ExternalTrackerURL\":\"https://tracker.com\",\"ExternalTrackerFormat\":\"https://tracker.com/{user}/{repo}/issues/{index}\",\"ExternalTrackerStyle\":\"alphanumeric\"}" + created_unix: 946684810 +- + id: 69 + repo_id: 2 + type: 2 + config: "{}" created_unix: 946684810
\ No newline at end of file |