Skip to content

Delete todos when users loses target read permissions

Jarka Košanová requested to merge todos-visibility-change into master

What does this MR do?

It removes todos when a user loses permissions to a todo target. That can happen in following cases

  • a user leaves/is removed from a private project (all todos of this project targets for the user will be removed)
  • a user leaves/is removed from a private group (all todos of this project targets including subgroups projects will be removed for the user)
  • a project is made private (all todos of all users not authorized to see the project will be removed)

Removing group todos will be part of adding group todos MR.

Are there points in the code the reviewer needs to double check?

  • Are all cases included?
  • Are there no other places in code that were missed?

Why was this MR needed?

This is first of 3 planned MRs that will come to finalize todos for epics. This part is common for CE and EE. We plan to simplify TodosFinder query and skip authorization check there and therefore need to remove todos for targets a user loses access to.

Following MRs:

  • migration MR - remove all todos for targets users don't have access to
  • add group todos (epic todos for EE)

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

gitlab-org/gitlab-ee#5481

Edited by Yorick Peterse

Merge request reports