update roles javascript