mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-07-10 16:00:04 +02:00
fix(sec): add tests for private issues on projects
- Add integration and unit tests to ensure that private issues on projects are not shown in any way, shape or form when the doer has no access to it.
This commit is contained in:
parent
71a61b5869
commit
daf7e193c3
6 changed files with 242 additions and 0 deletions
23
models/fixtures/PrivateIssueProjects/project.yml
Normal file
23
models/fixtures/PrivateIssueProjects/project.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
-
|
||||
id: 1001
|
||||
title: Org project that contains private issues
|
||||
owner_id: 3
|
||||
repo_id: 0
|
||||
is_closed: false
|
||||
creator_id: 2
|
||||
board_type: 1
|
||||
type: 3
|
||||
created_unix: 1738000000
|
||||
updated_unix: 1738000000
|
||||
|
||||
-
|
||||
id: 1002
|
||||
title: User project that contains private issues
|
||||
owner_id: 2
|
||||
repo_id: 0
|
||||
is_closed: false
|
||||
creator_id: 2
|
||||
board_type: 1
|
||||
type: 1
|
||||
created_unix: 1738000000
|
||||
updated_unix: 1738000000
|
17
models/fixtures/PrivateIssueProjects/project_board.yml
Normal file
17
models/fixtures/PrivateIssueProjects/project_board.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
-
|
||||
id: 1001
|
||||
project_id: 1001
|
||||
title: Triage
|
||||
creator_id: 2
|
||||
default: true
|
||||
created_unix: 1738000000
|
||||
updated_unix: 1738000000
|
||||
|
||||
-
|
||||
id: 1002
|
||||
project_id: 1002
|
||||
title: Triage
|
||||
creator_id: 2
|
||||
default: true
|
||||
created_unix: 1738000000
|
||||
updated_unix: 1738000000
|
11
models/fixtures/PrivateIssueProjects/project_issue.yml
Normal file
11
models/fixtures/PrivateIssueProjects/project_issue.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
-
|
||||
id: 1001
|
||||
issue_id: 6
|
||||
project_id: 1001
|
||||
project_board_id: 1001
|
||||
|
||||
-
|
||||
id: 1002
|
||||
issue_id: 7
|
||||
project_id: 1002
|
||||
project_board_id: 1002
|
Loading…
Add table
Add a link
Reference in a new issue