Peer Manipulation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user