infiniflow/ragflow · warning · AdminException

not implement: revoke role {role_name} actions: {actions} on

Error message

not implement: revoke role {role_name} actions: {actions} on {resource}

What it means

RoleMgr.revoke_role_permission (admin/server/roles.py:64) is a stub: logs 'not implement: revoke role {role_name} actions {actions} on {resource}' and raises AdminException. Revocation never happens because no permission state exists to revoke.

Source

Thrown at admin/server/roles.py:64

        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)

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

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

    @staticmethod
    def get_user_permission(user_name: str) -> Dict[str, Any]:
        error_msg = f"not implement: get user permission: {user_name}"
        logging.error(error_msg)
        raise AdminException(error_msg)

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Skip role-revocation APIs in this version; adjust tenant roles or is_superuser instead.
  2. Implement in a fork if real RBAC revocation is required.
Defensive patterns

Strategy: try-catch

Try / catch

from api.common.exceptions import AdminException
try:
    RoleMgr.revoke_role_permission(role, actions, resource)
except AdminException as e:
    if str(e).startswith("not implement"):
        pass  # no permission state exists; revocation is a no-op conceptually
    else:
        raise

Prevention

When it happens

Trigger: Calling RoleMgr.revoke_role_permission(role_name, actions, resource) during de-provisioning or lockdown scripts.

Common situations: Security runbooks trying to strip role rights; symmetric calls after (stubbed) grants failed.

Related errors


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