Chicago Convention 1944 Article 32 Licenses of personnel
(a) The pilot of every aircraft and the other members of the operating crew of every aircraft engaged in international navigation shall be provided with certificates of competency and licenses issued or rendered valid by the State in which the aircraftis registered.
(b) Each contracting State reserves the right to refuse torecognize, for the purpose of flight above its own territory, certificates of competency and licenses granted to any of its nationals by another contracting State.
So the CAA is entitled to do this.