使用事务更新/添加其他参与者的参与者



>假设我分别创建了两个参与者类型 A 和 B,以及一个只能由参与者类型 B 或管理员执行的事务 X。
此外,我添加了一些权限规则,即参与者 A 只能由管理员或其他类型 A 的参与者创建/更新。
现在,我在事务 X 中的逻辑需要创建/更新参与者 A。那么,如果我使用参与者 B 注册表 ID 之一执行事务 X,它是否能够创建/更新参与者 A?
如果没有,那么有什么办法可以做到这一点吗?

如果我正确理解了您的要求,那么这些规则应该适用于您想要的核心: (此示例使用默认的基本示例网络(

rule BforX {
description: "Allow B access to transaction X"
participant: "org.example.basic.SampleParticipantB"
operation: READ, CREATE, UPDATE
resource: "org.example.basic.SampleTransactionX"
action: ALLOW
}
rule BforAinX {
description: "Allow B access to A whilst in X"
participant: "org.example.basic.SampleParticipantB"
operation: READ, CREATE, UPDATE
resource: "org.example.basic.SampleParticipantA"
transaction: "org.example.basic.SampleTransactionX"
action: ALLOW
}
rule NotAforX {
description: "Deny A access to transaction X"
participant: "org.example.basic.SampleParticipantA"
operation: ALL
resource: "org.example.basic.SampleTransactionX"
action: DENY
}
rule AforA {
description: "Allow A access to Participant_A"
participant: "org.example.basic.SampleParticipantA"
operation: READ, CREATE, UPDATE
resource: "org.example.basic.SampleParticipantA"
action: ALLOW
}

最新更新