-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#1005] Hide individual attachments #7391
Conversation
Need to address points made in previous review #7327 (review) |
caafffe
to
5fa6885
Compare
From #7327 (review)
This has now been fixed and separated out into its own commit in: 3f6a3f1 |
e778ace
to
23baf65
Compare
From #7327 (review)
Fixed in 6c302bf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! So much work to get here, but everything much nicer as a result 🥷
I haven't been able to test every permutation of every visibility options per action, but given the much clearer Ability
checks I'm pretty confident.
Allowing us to check if an attachment can be `read` by checking its prominence and if the incoming message and info request are also readable.
We need to check attachment prominence when rendering correspondence on the `request#show` action and views.
We need to check attachment prominence when serving them directly or when converted to HTML.
We need to check attachment prominence when adding them to request ZIP downloads or the text version of the correspondence.
We need to check attachment prominence while updating the Xapian search index for events. To achieve the `IncomingMessae#get_body_for_quoting` method needed to be split, as it was being used for both indexing and displaying the body as text.
Update an attachment prominence from the admin and record an `edit_attachment` event on the relevant request.
af23784
to
5939b59
Compare
This tests 27 different permutations of different prominences values for requests, messages and attachments objects. Proving that viewing requests and attachments is correctly limited and the correct prominence reason shown.
5939b59
to
0eaac67
Compare
Relevant issue(s)
Supersedes #7327
Fixes #1005
What does this do?
Allows admins to edit attachment prominence and reason.
Add prominence checks for attachments when:
Why was this needed?
Easier admin of responses and attachments.
Implementation notes
Screenshots
Notes to reviewer