• Stan Hu's avatar
    Optimize system note visibility checking by hiding notes that · af3727b3
    Stan Hu authored
    have been fully redacted and contain cross-project references.
    
    The previous implementation relied on Note#cross_reference_not_visible_for?,
    which essentially tries to render all the Markdown references in a system note
    and only displays the note if the user can see the referring project. But this
    duplicated the work that Banzai::NotesRenderer was doing already. Instead, for
    each note we render, we memoize the number of visible user references and
    use it later if it is available.
    
    Improves #19273
    af3727b3
note_spec.rb 8.41 KB