# 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
        self.groups = groups
        self.permissions = permissions
        self.user_id = user_id
        self.session_id = session_id

    @property
    def authenticated(self) -> bool:
        return self._authenticated

    @property
    def administrator(self) -> bool:
        return self._administrator

    @property
    def force_reset(self) -> bool:
        return self._force_reset

    def has_permission(self, permission: str) -> bool:
        return self.permissions.get(permission, False)

    async def has_right_on_analysis(self, analysis_id: str, right: Right) -> bool:
        return True

    async def has_right_on_hmms(self, right: Right):
        if right == READ:
            return True

        if right == MODIFY or right == REMOVE:
            return self.has_permission("modify_hmm")


# 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

        self.groups = groups
        self.permissions = permissions
        self.user_id = user_id
        self.session_id = session_id

    @property
    def authenticated(self) -> bool:
        return self._authenticated

    @property
    def administrator(self) -> bool:
        return self._administrator

    @property
    def force_reset(self) -> bool:
        return self._force_reset

    def has_permission(self, permission: str) -> bool:
        return self.permissions.get(permission, False)

    async def has_right_on_analysis(self, analysis_id: str, right: Right) -> bool:
        return True

    async def has_right_on_hmms(self, right: Right):
        if right == READ:
            return True

        if right == MODIFY or right == REMOVE:
            return self.has_permission("modify_hmm")


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