infiniflow/ragflow · warning · AdminException

not implement: drop role: {role_name}

Error message

not implement: drop role: {role_name}

What it means

RoleMgr.delete_role (admin/server/roles.py:40) is a stub: logs 'not implement: drop role: ...' and raises AdminException. No role is ever deleted because roles are not persisted anywhere in this version.

Source

Thrown at admin/server/roles.py:40

class RoleMgr:
    @staticmethod
    def create_role(role_name: str, description: str):
        error_msg = f"not implement: create role: {role_name}, description: {description}"
        logging.error(error_msg)
        raise AdminException(error_msg)

    @staticmethod
    def update_role_description(role_name: str, description: str) -> Dict[str, Any]:
        error_msg = f"not implement: update role: {role_name} with description: {description}"
        logging.error(error_msg)
        raise AdminException(error_msg)

    @staticmethod
    def delete_role(role_name: str) -> Dict[str, Any]:
        error_msg = f"not implement: drop role: {role_name}"
        logging.error(error_msg)
        raise AdminException(error_msg)

    @staticmethod
    def list_roles() -> Dict[str, Any]:
        error_msg = "not implement: list roles"
        logging.error(error_msg)
        raise AdminException(error_msg)

    @staticmethod
    def get_role_permission(role_name: str) -> Dict[str, Any]:
        error_msg = f"not implement: show role {role_name}"
        logging.error(error_msg)
        raise AdminException(error_msg)

    @staticmethod
    def grant_role_permission(role_name: str, actions: list, resource: str) -> Dict[str, Any]:
        error_msg = f"not implement: grant role {role_name} actions: {actions} on {resource}"
        logging.error(error_msg)
        raise AdminException(error_msg)

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Skip role APIs entirely — nothing to delete since creation is also unimplemented.
  2. Remove custom RBAC state in your own store if you extended RoleMgr in a fork.
Defensive patterns

Strategy: try-catch

Try / catch

from api.common.exceptions import AdminException
try:
    RoleMgr.delete_role(name)
except AdminException as e:
    if str(e).startswith("not implement"):
        return  # nothing was created, nothing to delete
    raise

Prevention

When it happens

Trigger: Calling RoleMgr.delete_role(role_name) via the admin API/CLI role-deletion path.

Common situations: Cleanup attempts after experimenting with role endpoints; scripts assuming symmetry with create/list role APIs (which are equally stubbed).

Related errors


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/cec2b544c32e95e5. Report an issue: GitHub.