Up until now, you could manage access of site members to restricted pages only through the Site Members UI in the Business Manager. Now, you can do this also programmatically!
We’ve exposed two new APIs — assignRole() and removeRole() — to achieve this. You can find these new APIs in the new Roles subnamespace in wix-users-backend. Learn more
How do I get the list of roles of a specified member other than the currently logged in member