All hail the Court of Justice of the European Union! Here are two stories from the last week which show its central, and often overlooked, role.

The new Data Retention and Investigation Powers Bill, which has all-party support and will be railroaded through parliament within a few days, shows the court’s position as EU enforcer. The government claims that it is forced to take unusual emergency action because the court - in April, after a long lead-up period - declared the Data Retention Directive null and void.

I cannot resist saying a few more words about the proposed new bill, including an important quotation from the court’s judgment, which contains protections for lawyers that I hope will not be forgotten by the government in its rush to legislate.

The bill has not yet been published and is apparently just a few clauses long. It seems that it will deal only or in the main with metadata (that is, details such as the when, where and how long of the electronic communications that can be stored), rather than the content of the communication itself.

I offer the following advice, originally published by my organisation, the Council of Bars and Law Societies of Europe (CCBE), when the Data Retention Directive was itself about to be implemented, and which is likely to be entirely relevant to the new bill: ‘The fact of being able to know when, where, how and how many times a person consults his/her lawyer seriously challenges the confidentiality of the lawyer-client relationship and even the exercise of the right of defence itself … professional secrecy is not guaranteed when governments have eventual access to the retained data … the European parliament passed a legislative resolution at the same time as it passed the data retention directive.

‘The relevant part of this resolution of 14 December 2005 stressed the need to safeguard professional secrecy: The European parliament (…) 4. Considers that the member states have the right to apply their national constitutional principles and considers especially that professional secrecy will also be respected in the application of the present directive.’

As for the court’s decision, I pointed out at the time of the annulment that paragraph 58 of the judgment specifically refers to the absence of protections in the original directive for professional secrecy: ‘Furthermore, it does not provide for any exception, with the result that it applies even to persons whose communications are subject, according to rules of national law, to the obligation of professional secrecy.’

I see that the Law Society has asked for ‘explicit legislative protection for legal professional privilege in legislation like RIPA’, and I hope therefore that some of the detail just given will be absorbed into the final act.

Here is the second story about the court’s position as enforcer. (For real court followers, I should point out that the General Court is currently consulting on draft new rules of procedure.) This second piece of news hints at the court’s likely position in any future settlement with the UK, should the UK withdraw from the EU.

‘We should become like Switzerland!’ many Eurosceptics cry – ‘Look at how they flourish outside the EU!’ Well, this week, the EU’s negotiating position with Switzerland was published, drawn up in the light of Swiss unrest over the EU free-movement provisions that it has in the past adopted. From that negotiating position, it is clear that, in order to ensure homogeneity and a level playing field in the single market, the Court of Justice is proposed as the body to settle disputes between the EU and Switzerland, and its decisions will therefore be binding on Switzerland.

Apparently, the Swiss government has accepted this.

Assuming that the same deal will be extended to the UK in the event of a Brexit, its terms should be made clear: a court over which Switzerland has no control, and to which it does not appoint judges, will decide on matters relating to Switzerland. If the UK were to leave the EU under these circumstances, we need to understand that our position will be the exact opposite of what Brexit supporters claim.

The UK will have turned itself from a sovereign state, able to contribute to the court (for instance, being consulted on its rules of procedure through the Council of Ministers, and by appointing a judge and advocate general) and become instead an EU colony, which is apparently how some Swiss see the proposed deal.

The court’s recently announced ‘right to be forgotten’ in relation to Google searches should not apply to the court itself. We must remember its central position, likely to be maintained whether we are in or out of the EU, and for so long as we remain in the single market.

Jonathan Goldsmith is secretary general of the Council of Bars and Law Societies of Europe, which represents around a million European lawyers through its member bars and law societies. He blogs weekly for the Gazette on European affairs