President Cyril Ramaphosa assented to controversial intelligence legislation that civil society fears could give the state powers to submit almost anyone to invasive security checks.