Skip to content

Fix visibility reference check

Jan Provaznik requested to merge jp-ref_fix into master

What does this MR do?

When all references in a system note are checked, it's not reliable to check if there was any not-visible reference returned by an individual parser because that reference could be satisfied by another parser.

For example if @jprovaznik is referenced in a commit message, then it wouldn't be recognized as a visible reference by group reference filter (because it's a user), but it will be recognized by user reference filter. So although some filters may return "invisible" nodes, as long as all nodes are marked as visible by a filter, the note should be still visible.

Instead we check if in the end all nodes were visible.

Related to #336491 (closed)

Screenshots or Screencasts (strongly suggested)

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • 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 Jan Provaznik

Merge request reports

Loading