infiniflow/ragflow · warning · AdminException
not implement: list roles
Error message
not implement: list roles
What it means
RoleMgr.list_roles (admin/server/roles.py:46) is a stub that logs 'not implement: list roles' and raises AdminException. It cannot return the declared Dict[str, Any]; any role listing request fails instead of returning an (empty) role set.
Source
Thrown at admin/server/roles.py:46
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)
@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)View on GitHub (pinned to 554fb1133a)
Solutions
- Do not query role listings in this version; the feature is not implemented.
- If you must render a roles page, catch AdminException here and show an 'unsupported' state rather than an error.
- Implement list_roles in a fork backed by your permission store.
Defensive patterns
Strategy: try-catch
Try / catch
from api.common.exceptions import AdminException
try:
roles = RoleMgr.list_roles()
except AdminException as e:
if str(e).startswith("not implement"):
roles = {} # render 'roles unsupported' in UI instead of erroring
else:
raise Prevention
- Have admin UIs degrade to 'unsupported' when a listing API raises not-implement.
- Don't use role listing as a health check for the admin server.
When it happens
Trigger: Calling RoleMgr.list_roles() — e.g. an admin console 'roles' page or CLI list command delegating to it.
Common situations: UI panels or SDKs enumerating roles during discovery/setup and hitting the unconditional raise.
Related errors
- not implement: create role: {role_name}, description: {descr
- not implement: update role: {role_name} with description: {d
- not implement: drop role: {role_name}
- not implement: show role {role_name}
- not implement: grant role {role_name} actions: {actions} on
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/ea01c76f583422e1.
Report an issue: GitHub.