async def get_users(app, return_fields=["username", "permissions", "cards"]):
    """Retrieve all users from the database.

    Parameters
    ----------
    app : aiohttp.web.Application
        The aiohttp application instance
    return_fields : list, default=["username", "permissions", "cards"]
        The fields to be returned for each user.
    Returns
    -------
    users : list
        A list of user documents
    """
    projection = {}
    for field in return_fields:
        projection[field] = 1
    if "_id" not in return_fields:
        projection["_id"] = 0
    return app["db"].users.find({}, projection=projection)