When viewing an attachment on a ticket if the user clicks "Download" and doesn't have the necessary privileges they are redirected to the login page. If the user doesn't have permission to download attachments maybe the link just shouldn't show up?