Scotland gets onshore licensing authority