0.11-stable: Fixed the test for replacing attachments, which should be allowed even if a user doesn't have `ATTACHMENT_DELETE` if that user is authenticated and is replacing her own attachment (as per [1874]).
Also, hidden the "Replace attachment" checkbox in the only case where it is certain that the user cannot replace any attachments (an anonymous user).