# Path: virtool/types.py



from typing import Any, Dict
from virtool.types import Document
import virtool.users.utils
import virtool.utils
    "handle",
    "administrator",
    "email",
    "groups",
    "last_password_change",
    "permissions",
    "primary_group",
    "settings",
)


def compose_password_update(password: str) -> Dict[str, Any]:
    """
    Compose an update dict for self-changing a users account password.

    This will disable forced reset and won't invalidate current sessions, unlike a
    password change by an administrator.

    :param password: the new password
    :return: a password update

    """
    return {
        "password": virtool.users.utils.hash_password(password),
        "invalidate_sessions": False,
        "last_password_change": virtool.utils.timestamp(),
        "force_reset": False,
    }



# Path: virtool/types.py



# Path: virtool/account/db.py
from typing import Any, Dict
from virtool.types import Document
import virtool.users.utils
import virtool.utils

    "handle",
    "administrator",
    "email",
    "groups",
    "last_password_change",
    "permissions",
    "primary_group",
    "settings",
)


def compose_password_update(password: str) -> Dict[str, Any]:
    """
    Compose an update dict for self-changing a users account password.

    This will disable forced reset and won't invalidate current sessions, unlike a
    password change by an administrator.

    :param password: the new password
    :return: a password update

    """
    return {
        "password": virtool.users.utils.hash_password(password),
        "invalidate_sessions": False,
        "last_password_change": virtool.utils.timestamp(),
        "force_reset": False,
    }



async def get(db, user_id: str) -> Document: