[JsonRpc] Fixed access control middleware.