I am reading Lectures on Gauge Theory by David Tong 1. In 3.6.2 first example that the author talk about pure $U(1)$ gauge theory in 4D. In this example, he talk about two 1-form symmetries: electric $U(1)_e$, with 2-form current $j_e \propto *F$, and magnetic $U(1)_m$, with 2-form current $j_m \propto F=dA$. It is mentioned that the action of the electric 1-form symmetry on the gauge field $A$ is a shift by a flat connection $\lambda$, i.e., $d\lambda=0$.
How I can calculate it? Is it possible derive current from Lagrangian using knowledge about action on fields?