Skip to content

Add permission for indexed notes and update when permissions change

What does this MR do?

Related to #300351 (closed)

Re-adding the new permission fields to the Notes document for indexing. Including all updates that must occur to notes documents if the permissions are updated.

Changes from that MR:

  • split work into three MRs:
    • this one with new data fields for indexing
    • a migration to cleanup permission data from the previous migration attempt: !53525 (merged)
    • a migration to back fill the permission data !53406 (merged)
  • Use noteable object to determine what project feature access_level is required. Sometimes the noteable_id field is null so I added a spec to make sure it handles that case.
  • Add new specs + refactor existing specs

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Terri Chu

Merge request reports

Loading