added protection for edit actions on assets and galleries, including Tests. added gallery links to gallery on asset pages.