Fix a bug where server/local site admins couldn't edit draft attachments.
Review Request #8388 — Created Sept. 8, 2016 and submitted
We had a check in the base file attachment resource for determining whether draft file attachments should be considered when presenting results to a requesting user. This performed a direct comparison against the user, checking if it's the same user who owns the review request. This differs from other resources that check if the review request is mutable by the user. The result was that an admin could upload file attachments to a review request, but could not edit their captions after the fact. This changes the logic to check for mutability, fixing edits on draft file attachments. It's still not recommended that admins upload file attachments to another user's review request, and they still won't see a draft banner if they don't own the review request, but this at least solves the consistency and expectations problems.
Before the fix, these unit tests failed, reproducing the customer
problem. After the fix, the unit tests passed.