Added before action to locations controller