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

@@ -130,7 +130,9 @@ func (a *workspaceMongoAccessor) share(realData *Workspace, method tools.METHOD,
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 method == tools.DELETE { // If the workspace is deleted, share the deletion