{"record":{"id":"43656173d2ca3c52","repo":"ruvnet/RuView","slug":"user-account-is-disabled","errorCode":null,"errorMessage":"User account is disabled","messagePattern":"User account is disabled","errorType":"exception","errorClass":"AuthenticationError","httpStatus":401,"severity":"error","filePath":"archive/v1/src/middleware/auth.py","lineNumber":273,"sourceCode":"            if scheme.lower() != \"bearer\":\n                raise AuthenticationError(\"Invalid authentication scheme\")\n        except ValueError:\n            raise AuthenticationError(\"Invalid authorization header format\")\n        \n        # Verify token\n        try:\n            payload = self.token_manager.verify_token(token)\n            username = payload.get(\"sub\")\n            if not username:\n                raise AuthenticationError(\"Invalid token payload\")\n            \n            # Get user info\n            user = self.user_manager.get_user(username)\n            if not user:\n                raise AuthenticationError(\"User not found\")\n            \n            if not user.get(\"is_active\", False):\n                raise AuthenticationError(\"User account is disabled\")\n            \n            # Return user info without sensitive data\n            return {\n                \"username\": user[\"username\"],\n                \"email\": user[\"email\"],\n                \"roles\": user[\"roles\"],\n                \"is_active\": user[\"is_active\"],\n            }\n            \n        except AuthenticationError:\n            raise\n        except Exception as e:\n            logger.error(f\"Token verification error: {e}\")\n            raise AuthenticationError(\"Token verification failed\")\n    \n    def _requires_auth(self, request: Request) -> bool:\n        \"\"\"Check if the request requires authentication.\"\"\"\n        # All API endpoints require authentication by default","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/middleware/auth.py#L255-L291","documentation":"Error \"User account is disabled\" thrown in ruvnet/RuView.","triggerScenarios":"Thrown at archive/v1/src/middleware/auth.py:273 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}