Make sure list / task favorites are set per user, not per entity #915

Merged
konrad merged 15 commits from fix/favorites into main 2021-07-10 10:21:54 +00:00
Owner

Description

This PR changes the way task/list favorites are saved internally: Previously, each entity had a is_favorite field in the db. If a user marked it as favorite, the field would contain true.
This has one big issue: Favorites are global - if one user of a shared lists marks that as favorite it is set to be favorite for everyone.

From now on, all favorite state is saved in a separate table and joined together when a user requests a list of lists/tasks.

Resolves vikunja/api#914

Checklist

  • Add a new test to make sure users only see their own favorites
# Description This PR changes the way task/list favorites are saved internally: Previously, each entity had a `is_favorite` field in the db. If a user marked it as favorite, the field would contain true. This has one big issue: Favorites are global - if one user of a shared lists marks that as favorite it is set to be favorite for everyone. From now on, all favorite state is saved in a separate table and joined together when a user requests a list of lists/tasks. Resolves https://kolaente.dev/vikunja/api/issues/914 # Checklist * [x] Add a new test to make sure users only see their own favorites
konrad added 11 commits 2021-07-09 21:12:43 +00:00
konrad added 1 commit 2021-07-09 21:13:28 +00:00
continuous-integration/drone/pr Build is failing Details
790ecfef87
Fix test fixtures
konrad added 1 commit 2021-07-10 09:59:25 +00:00
continuous-integration/drone/pr Build is failing Details
783bda514f
Fix favorite tasks for related tasks
konrad added 1 commit 2021-07-10 10:06:07 +00:00
continuous-integration/drone/pr Build is failing Details
5530e1e42e
Add test to make sure a user only sees their favorites
konrad added 1 commit 2021-07-10 10:10:37 +00:00
continuous-integration/drone/pr Build is passing Details
e15ee55656
Fix test fixtures
konrad merged commit d0c77ad1c1 into main 2021-07-10 10:21:54 +00:00
konrad deleted branch fix/favorites 2021-07-10 10:21:59 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#915
No description provided.