Fix next/prev file attachments when Review UIs are unavailable.

Review Request #14022 — Created July 11, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

The next and previous file attachment pop-outs were broken if an
attachment either did not have a Review UI, or had a Review UI which was
not available. This change makes it so we check to ensure that the link
will lead to a working page, and skip over any attachments that won't.

Created a series of attachments where some file types just didn't have
review UIs, and some had disabled review UIs (a PDF with a user who did
not have access to power pack). Saw that I no longer got links to 404s.

Changes between revision 1 and 2

orig
1
2

Commits

Summary ID Author
Fix next/prev file attachments when Review UIs are unavailable.
The next and previous file attachment pop-outs were broken if an attachment either did not have a Review UI, or had a Review UI which was not available. This change makes it so we check to ensure that the link will lead to a working page, and skip over any attachments that won't. Testing Done: Created a series of attachments where some file types just didn't have review UIs, and some had disabled review UIs (a PDF with a user who did not have access to power pack). Saw that I no longer got links to 404s.
1bdbd7c497b98c238d4a868aba93042a777d5012 David Trowbridge
Fix next/prev file attachments when Review UIs are unavailable.
The next and previous file attachment pop-outs were broken if an attachment either did not have a Review UI, or had a Review UI which was not available. This change makes it so we check to ensure that the link will lead to a working page, and skip over any attachments that won't. Testing Done: Created a series of attachments where some file types just didn't have review UIs, and some had disabled review UIs (a PDF with a user who did not have access to power pack). Saw that I no longer got links to 404s.
37b4a5ebc0c7d86496c1a25b962c63b24afcdf83 David Trowbridge
reviewboard/reviews/ui/base.py
reviewboard/reviews/views/attachments.py
Loading...