Two environmental organisations have been granted permission for a legal challenge on the Rosebank and Jackdaw offshore oil and gas fields in the North Sea.