Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我尝试了超级账本结构私有数据收集功能,但由于我是初学者,我不知道如何让只有所有者才能访问他的数据而不是整个组织
织物中没有直接的方法可以做到这一点。Collections Config 仅在身份组级别支持它
您必须在查询时在链码中添加必要的规则,并使您的数据知道 ownerId
在存储数据时,您可以在数据中添加一个名为 OwnerId stub.GetCreator() 的字段可用于填充此字段
在您的链码中查询数据时,使用 stub.GetCreator() 验证 OwnerId 字段