mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-05-04 10:56:45 +00:00
CheckIsArchived() previously skipped checking a child project's own IsArchived flag when ParentProjectID > 0, immediately recursing to only check the parent. This allowed write operations on individually archived child projects whose parent was not archived. Now the function loads the project from the database first, checks its own IsArchived flag, and only then recurses to check parent projects.
364 lines
7.0 KiB
YAML
364 lines
7.0 KiB
YAML
-
|
|
id: 1
|
|
title: Test1
|
|
description: Lorem Ipsum
|
|
identifier: test1
|
|
owner_id: 1
|
|
position: 3
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 2
|
|
title: Test2
|
|
description: Lorem Ipsum
|
|
identifier: test2
|
|
owner_id: 3
|
|
position: 2
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 3
|
|
title: Test3
|
|
description: Lorem Ipsum
|
|
identifier: test3
|
|
owner_id: 3
|
|
position: 1
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 4
|
|
title: Test4
|
|
description: Lorem Ipsum
|
|
identifier: test4
|
|
owner_id: 3
|
|
position: 4
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 5
|
|
title: Test5
|
|
description: Lorem Ipsum
|
|
identifier: test5
|
|
owner_id: 5
|
|
position: 5
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 6
|
|
title: Test6
|
|
description: Lorem Ipsum
|
|
identifier: test6
|
|
owner_id: 6
|
|
position: 6
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 7
|
|
title: Test7
|
|
description: Lorem Ipsum
|
|
identifier: test7
|
|
owner_id: 6
|
|
position: 7
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 8
|
|
title: Test8
|
|
description: Lorem Ipsum
|
|
identifier: test8
|
|
owner_id: 6
|
|
position: 8
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 9
|
|
title: Test9
|
|
description: Lorem Ipsum
|
|
identifier: test9
|
|
owner_id: 6
|
|
position: 9
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 10
|
|
title: Test10
|
|
description: Lorem Ipsum
|
|
identifier: test10
|
|
owner_id: 6
|
|
position: 10
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 11
|
|
title: Test11
|
|
description: Lorem Ipsum
|
|
identifier: test11
|
|
owner_id: 6
|
|
position: 11
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 12
|
|
title: Test12
|
|
description: Lorem Ipsum
|
|
identifier: test12
|
|
owner_id: 6
|
|
position: 12
|
|
parent_project_id: 27
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 13
|
|
title: Test13
|
|
description: Lorem Ipsum
|
|
identifier: test13
|
|
owner_id: 6
|
|
position: 13
|
|
parent_project_id: 28
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 14
|
|
title: Test14
|
|
description: Lorem Ipsum
|
|
identifier: test14
|
|
owner_id: 6
|
|
position: 14
|
|
parent_project_id: 29
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 15
|
|
title: Test15
|
|
description: Lorem Ipsum
|
|
identifier: test15
|
|
owner_id: 6
|
|
position: 15
|
|
parent_project_id: 32
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 16
|
|
title: Test16
|
|
description: Lorem Ipsum
|
|
identifier: test16
|
|
owner_id: 6
|
|
position: 16
|
|
parent_project_id: 33
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 17
|
|
title: Test17
|
|
description: Lorem Ipsum
|
|
identifier: test17
|
|
owner_id: 6
|
|
position: 17
|
|
parent_project_id: 34
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
# This project is owned by user 7, and several other users have access to it via different methods.
|
|
# It is used to test the projectUsers method.
|
|
-
|
|
id: 18
|
|
title: Test18
|
|
description: Lorem Ipsum
|
|
identifier: test18
|
|
owner_id: 7
|
|
position: 18
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 19
|
|
title: Test19
|
|
description: Lorem Ipsum
|
|
identifier: test19
|
|
owner_id: 7
|
|
position: 19
|
|
parent_project_id: 29
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
# User 1 does not have access to this project
|
|
-
|
|
id: 20
|
|
title: Test20
|
|
description: Lorem Ipsum
|
|
identifier: test20
|
|
owner_id: 13
|
|
position: 20
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 21
|
|
title: Test21 archived through parent list
|
|
description: Lorem Ipsum
|
|
identifier: test21
|
|
owner_id: 1
|
|
position: 21
|
|
parent_project_id: 22
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 22
|
|
title: Test22 archived individually
|
|
description: Lorem Ipsum
|
|
identifier: test22
|
|
owner_id: 1
|
|
is_archived: 1
|
|
position: 22
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 23
|
|
title: Test23
|
|
description: Lorem Ipsum
|
|
identifier: test23
|
|
owner_id: 12
|
|
position: 23
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 24
|
|
title: Test24
|
|
description: Lorem Ipsum
|
|
identifier: test6
|
|
owner_id: 6
|
|
position: 7
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 25
|
|
title: Test25
|
|
owner_id: 6
|
|
parent_project_id: 12
|
|
position: 25
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 26
|
|
title: Test26
|
|
owner_id: 6
|
|
parent_project_id: 25
|
|
position: 26
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 27
|
|
title: Test27
|
|
owner_id: 6
|
|
position: 2700
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 28
|
|
title: Test28
|
|
owner_id: 6
|
|
position: 2800
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 29
|
|
title: Test29
|
|
owner_id: 6
|
|
position: 2900
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 30
|
|
title: Test30
|
|
owner_id: 6
|
|
position: 3000
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 31
|
|
title: Test31
|
|
owner_id: 6
|
|
position: 3100
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 32
|
|
title: Test32
|
|
owner_id: 6
|
|
position: 3200
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 33
|
|
title: Test33
|
|
owner_id: 6
|
|
position: 3300
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 34
|
|
title: Test34
|
|
owner_id: 6
|
|
position: 3400
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 35
|
|
title: Test35 with background
|
|
description: Lorem Ipsum
|
|
identifier: test6
|
|
owner_id: 6
|
|
background_file_id: 1
|
|
position: 8
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 36
|
|
title: Project 36 for Caldav tests
|
|
description: Lorem Ipsum
|
|
identifier: test36
|
|
owner_id: 15
|
|
position: 1
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 37
|
|
title: Project 37
|
|
description: Lorem Ipsum
|
|
identifier: test37
|
|
owner_id: 16
|
|
position: 1
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
-
|
|
id: 38
|
|
title: Project 38 for Caldav tests
|
|
description: Lorem Ipsum
|
|
identifier: test38
|
|
owner_id: 15
|
|
position: 2
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
# Orphaned project: parent_project_id 999999 does not exist.
|
|
# Used by TestRepairOrphanedProjects.
|
|
-
|
|
id: 39
|
|
title: Orphaned project with deleted parent
|
|
description: This project has a parent_project_id pointing to a non-existent project
|
|
identifier: orph1
|
|
owner_id: 1
|
|
parent_project_id: 999999
|
|
is_archived: 1
|
|
position: 39
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|
|
# Child project that is archived individually, but its parent (project 1) is NOT archived.
|
|
# Used by TestArchived to verify that CheckIsArchived checks the child's own flag.
|
|
-
|
|
id: 40
|
|
title: Test40 child archived individually
|
|
description: Lorem Ipsum
|
|
identifier: test40
|
|
owner_id: 1
|
|
parent_project_id: 3
|
|
is_archived: 1
|
|
position: 40
|
|
updated: 2018-12-02 15:13:12
|
|
created: 2018-12-01 15:13:12
|