# Path: virtool/http/rights.py
# READ = "read"
# MODIFY = "modify"
# REMOVE = "remove"


from abc import ABC, abstractmethod
from typing import Dict, Optional, Sequence, Union
from virtool.http.rights import MODIFY, READ, REMOVE, Right
from virtool.jobs.utils import JobRights
    async def has_right_on_sample(self, sample_id: str, right: Right) -> bool:
        ...

    @abstractmethod
    async def has_right_on_subtraction(self, subtraction_id: str, right: Right) -> bool:
        ...

    @abstractmethod
    async def has_right_on_upload(self, upload_id: str, right: Right) -> bool:
        ...


class UserClient(AbstractClient):
    def __init__(
        self,
        db,
        administrator: bool,
        force_reset: bool,
        groups: Sequence[str],
        permissions: Dict[str, bool],
        user_id: Union[str, None],
        authenticated: bool,
        session_id: Optional[str] = None,
    ):
        self._db = db
        self._force_reset = force_reset
        self._administrator = administrator
        self._authenticated = authenticated
        self.groups = groups
        self.permissions = permissions

# Path: virtool/http/rights.py
# READ = "read"
# MODIFY = "modify"
# REMOVE = "remove"


# Path: virtool/http/client.py
from abc import ABC, abstractmethod
from typing import Dict, Optional, Sequence, Union
from virtool.http.rights import MODIFY, READ, REMOVE, Right
from virtool.jobs.utils import JobRights

    async def has_right_on_sample(self, sample_id: str, right: Right) -> bool:
        ...

    @abstractmethod
    async def has_right_on_subtraction(self, subtraction_id: str, right: Right) -> bool:
        ...

    @abstractmethod
    async def has_right_on_upload(self, upload_id: str, right: Right) -> bool:
        ...


class UserClient(AbstractClient):
    def __init__(
        self,
        db,
        administrator: bool,
        force_reset: bool,
        groups: Sequence[str],
        permissions: Dict[str, bool],
        user_id: Union[str, None],
        authenticated: bool,
        session_id: Optional[str] = None,
    ):
        self._db = db
        self._force_reset = force_reset
        self._administrator = administrator
        self._authenticated = authenticated
        self.groups = groups
        self.permissions = permissions

        self.user_id = user_id