Scotland and Wales will play a role (what role remains to be seen) in the Article 50 Brexit challenge before the Supreme Court in a fortnight’s time after the respective governments were granted permission to intervene.  Differing comments from the respective camps:

"...triggering article 50 will directly affect devolved interests and rights in Scotland,” [Nicola Sturgeon] said. “And triggering article 50 will inevitably deprive Scottish people and Scottish businesses of rights and freedoms which they currently enjoy.

“It simply cannot be right that those rights can be removed by the UK government on the say-so of a prime minister without parliamentary debate, scrutiny or consent.”

The lord advocate’s submission to the supreme court said leaving the EU would lead to Scottish residents and businesses including EU citizens now resident in Scotland “losing rights and freedoms which they currently enjoy.”