Peer Manipulation

This commit is contained in:
mr
2026-01-26 16:29:09 +01:00
parent b35d4e2b36
commit 802786daa7
8 changed files with 98 additions and 58 deletions

View File

@@ -68,7 +68,9 @@ func (a *workflowMongoAccessor) share(realData *Workflow, delete bool, caller *t
paccess := &peer.Peer{}
for _, p := range res.(*shallow_collaborative_area.ShallowCollaborativeArea).Peers {
paccess.UUID = p
if ok, _ := paccess.IsMySelf(); ok { // if the peer is the current peer, never share because it will create a loop
if ok, _ := utils.IsMySelf(p, paccess.GetAccessor(&tools.APIRequest{
Admin: true,
})); ok { // if the peer is the current peer, never share because it will create a loop
continue
}
if delete { // if the workflow is deleted, share the deletion orderResourceAccessor utils.Accessor