{"record":{"id":"fcfad78a66113693","repo":"infiniflow/ragflow","slug":"not-implement-update-role-role-name-with-descr","errorCode":null,"errorMessage":"not implement: update role: {role_name} with description: {description}","messagePattern":"not implement: update role: (.+?) with description: (.+?)","errorType":"http","errorClass":"AdminException","httpStatus":400,"severity":"warning","filePath":"admin/server/roles.py","lineNumber":34,"sourceCode":"import logging\n\nfrom typing import Dict, Any\n\nfrom api.common.exceptions import AdminException\n\n\nclass RoleMgr:\n    @staticmethod\n    def create_role(role_name: str, description: str):\n        error_msg = f\"not implement: create role: {role_name}, description: {description}\"\n        logging.error(error_msg)\n        raise AdminException(error_msg)\n\n    @staticmethod\n    def update_role_description(role_name: str, description: str) -> Dict[str, Any]:\n        error_msg = f\"not implement: update role: {role_name} with description: {description}\"\n        logging.error(error_msg)\n        raise AdminException(error_msg)\n\n    @staticmethod\n    def delete_role(role_name: str) -> Dict[str, Any]:\n        error_msg = f\"not implement: drop role: {role_name}\"\n        logging.error(error_msg)\n        raise AdminException(error_msg)\n\n    @staticmethod\n    def list_roles() -> Dict[str, Any]:\n        error_msg = \"not implement: list roles\"\n        logging.error(error_msg)\n        raise AdminException(error_msg)\n\n    @staticmethod\n    def get_role_permission(role_name: str) -> Dict[str, Any]:\n        error_msg = f\"not implement: show role {role_name}\"\n        logging.error(error_msg)\n        raise AdminException(error_msg)","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/admin/server/roles.py#L16-L52","documentation":"RoleMgr.update_role_description (admin/server/roles.py:34) is a stub that logs 'not implement: update role ...' and raises AdminException unconditionally. No role-description update ever occurs; the method exists only to reserve the API shape for a future implementation.","triggerScenarios":"Calling RoleMgr.update_role_description(role_name, description), e.g. via an admin role-management endpoint that forwards to it.","commonSituations":"Attempting RBAC configuration through documented-but-unimplemented role endpoints.","solutions":["Avoid the role APIs; use is_superuser / tenant-role fields for access control in this version.","Implement the method in a fork or wait for an upstream release that fills in RoleMgr."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from api.common.exceptions import AdminException\ntry:\n    RoleMgr.update_role_description(role, desc)\nexcept AdminException as e:\n    if str(e).startswith(\"not implement\"):\n        # feature unavailable: skip or implement in a fork\n        pass\n    raise","preventionTips":["Audit which admin APIs are stubs before writing automation (search roles.py for 'not implement').","Prefer DB-level authorization fields over unimplemented role APIs."],"tags":["not-implemented","roles","rbac","admin"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}