# 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
    @abstractmethod
    async def has_right_on_index(self, index_id: str, right: Right) -> bool:
        ...

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

    @abstractmethod
    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],

# 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

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

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

    @abstractmethod
    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,