ruvnet/RuView · error · AuthorizationError

Authentication required

Error message

Authentication required

What it means

Error "Authentication required" thrown in ruvnet/RuView.

Source

Thrown at archive/v1/src/middleware/auth.py:403

        user_roles = user_info.get("roles", [])
        
        # Admin role has all permissions
        if "admin" in user_roles:
            return True
        
        # Check specific role
        return required_role in user_roles
    
    def require_role(self, required_role: str):
        """Decorator to require specific role."""
        def decorator(func):
            import functools
            
            @functools.wraps(func)
            async def wrapper(request: Request, *args, **kwargs):
                user_info = getattr(request.state, "user", None)
                if not user_info:
                    raise AuthorizationError("Authentication required")
                
                if not self.check_permission(user_info, required_role):
                    raise AuthorizationError(f"Role '{required_role}' required")
                
                return await func(request, *args, **kwargs)
            
            return wrapper
        return decorator


# Global authentication middleware instance
_auth_middleware: Optional[AuthenticationMiddleware] = None


def get_auth_middleware(settings: Settings) -> AuthenticationMiddleware:
    """Get authentication middleware instance."""
    global _auth_middleware
    if _auth_middleware is None:

View on GitHub (pinned to 4685618388)

When it happens

Trigger: Thrown at archive/v1/src/middleware/auth.py:403 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16). Data as JSON: /api/errors/28e7a4245f8c826d. Report an issue: GitHub.