More tidying up of helper methods

Created a has_permission helper method which simply uses the current
request and context of the view, making the templates a bit simpler