moving permission button to a helper and displaying it on the generic file show page.  fixes #3894