Add missing ATTACHMENT_VIEW permission check while rendering an attachment.
(patch by osimons)
Authored by: cboos 2007-11-16
Parent: [r6161]
Child: [r6163]