Spanish courts allow Puigdemont to run in EU elections