[ticket/12421] Don't parse [attachment] tags if user can't view them

https://tracker.phpbb.com/browse/PHPBB3-12421

- [x] #2336 
- [x] #2373  

PHPBB3-12421