mirror of
1
Fork 0
forgejo/tests
Gusted a2958f5a26 fix: consider public issues for project boards (#7143)
- The security patch of forgejo/forgejo#6843 fixed the issue where project boards loaded all issues without considering if the doer actually had permission to view that issue. Within that patch the call to `Issues` was modified to include this permission checking.
- The query being generated was not entirely correct. Issues in public repositories weren't considered correctly (partly the fault of not setting `AllPublic` unconditionally) in the cause an authenticated user loaded the project.
- This is now fixed by setting `AllPublic` unconditionally and subsequently fixing the `Issue` function to ensure that the combination of setting `AllPublic` and `User` generates the correct query, by combining the permission check and issues in public repositories as one `AND` query.
- Added unit testing.
- Added integration testing.
- Resolves Codeberg/Community#1809
- Regression of https://codeberg.org/forgejo/forgejo/pulls/6843

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7143
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-06 23:26:08 +00:00
..
e2e Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00
fuzz Fix fuzz test (#33156) 2025-01-12 09:02:47 +01:00
gitea-lfs-meta
gitea-repositories-meta chore: remove illegal git usage (#6488) 2025-01-07 17:28:42 +00:00
integration fix: consider public issues for project boards (#7143) 2025-03-06 23:26:08 +00:00
testdata/data Add artifacts test fixture (#30300) 2024-11-05 09:33:15 +01:00
mysql.ini.tmpl chore: improve slow tests 2024-11-14 12:41:11 +01:00
pgsql.ini.tmpl chore: improve slow tests 2024-11-14 12:41:11 +01:00
sqlite.ini.tmpl test: use memory for integration and journal for migration 2024-11-14 15:38:06 +01:00
test_utils.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118) 2025-03-04 21:38:35 +00:00