If I understand correctly, in the Refs below:

We can see that the moduli space of SU($N$) flat connections over a torus, is equivalent to a complex projective space $\mathbb{P}^{N-1}$ Namely, $$ M_{\rm flat}=\mathbb{E} / {S}_N = \mathbb{P}^{N-1} $$ where $\mathbb{E}$ is given by $$ \mathbb E := \left\{ (\phi_1,\cdots, \phi_N) \equiv {(\mathbb T^2)}^N; \text{ subject to a constrain }\sum_i \phi_i=0 \right\} . $$ while the ${S}_N$ is the symmetric group usually denoted as $S_N$ (the Weyl group of SU$(N)$).

My questions

what is the moduli space of U(1) flat connections over a genus $g$-Riemann surface?

what is the moduli space of SU(N) flat connections over a genus $g$-Riemann surface?

Thank you for the kind comments and helps!