Hide attachments in history if user can't see them

If user is not allowed to view attachments (i.e. their access level is
lower than $g_view_attachments_threshold), then the history should not
display information about attachments.

Fixes #17744