code: async function clearUserRoles (userId, roleMembershipModel) {
    const existingRoles = await roleMembershipModel.find({
      where: {
        memberId: { equals: userId },
        memberType: { equals: 'user' }
      }
    })
    for (const { roleId, memberId } of existingRoles) {
      await roleMembershipModel.destroyById([roleId, 'user', memberId])
    }
  }
docs: ensureUserRoles