Removing user permissions

Can you remove channels and roles from a user inside the sync function? Or do you need to use the admin API?

You can’t remove channels and roles that have been granted to the user via the admin API (“admin” channels and roles). However, channels and roles that were granted by a previous revision of the document can be revoked simply by not granting that access in the current revision of the document.