Cartan-decomposition subgroups of SO(2,n)