This Habari plugin allows the insertion of links to files into a post such that access to those links is only allowed if you are also allowed access to the post they appear in.