infiniflow/ragflow · warning · AdminException
not implement: get user permission: {user_name}
Error message
not implement: get user permission: {user_name} What it means
RoleMgr.get_user_permission (admin/server/roles.py:76) is the last stub of the RoleMgr surface: logs 'not implement: get user permission: {user_name}' and raises AdminException. Effective-permission queries for a user are unimplemented; the call returns no data.
Source
Thrown at admin/server/roles.py:76
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
- Derive permissions from what is implemented: check is_superuser and the user's tenant roles directly.
- Implement in a fork if you need an effective-permission API.
Defensive patterns
Strategy: try-catch
Validate before calling
def user_permission_supported() -> bool:
# RoleMgr.get_user_permission is a stub in this version
return False Try / catch
from api.common.exceptions import AdminException
try:
perms = RoleMgr.get_user_permission(user)
except AdminException as e:
if str(e).startswith("not implement"):
perms = {"superuser": bool(user_row.is_superuser)} # derive from implemented fields
else:
raise Prevention
- Derive effective permissions from is_superuser and tenant membership.
- Build audit tooling on the user/tenant tables, not on RoleMgr stubs.
When it happens
Trigger: Calling RoleMgr.get_user_permission(user_name), e.g. an admin UI 'view user permissions' action or an authorization check in custom tooling.
Common situations: Audit tooling enumerating what a user may do; debugging 403s by inspecting permissions (which instead raises this).
Related errors
- not implement: show role {role_name}
- not implement: grant role {role_name} actions: {actions} on
- not implement: revoke role {role_name} actions: {actions} on
- not implement: create role: {role_name}, description: {descr
- not implement: update role: {role_name} with description: {d
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/455484d36d9051c2.
Report an issue: GitHub.