Browse Source

Update 'src/main/java/org/gcube/data/access/storagehub/services/MessageManager.java'

solved Incident #22230
master r5.5.0
Lucio Lelii 1 month ago
parent
commit
647dbb651a
  1. 4
      src/main/java/org/gcube/data/access/storagehub/services/MessageManager.java

4
src/main/java/org/gcube/data/access/storagehub/services/MessageManager.java

@ -375,13 +375,13 @@ public class MessageManager extends Impersonable{
private Node checkRights(String user, Message messageItem) throws RepositoryException, StorageHubException{
Node personalNode = null;
Node messageNode = (Node) messageItem.getRelatedNode();
if (messageNode.getPath().startsWith(pathUtil.getWorkspacePath(currentUser).toPath()))
if (messageNode.getPath().startsWith(pathUtil.getInboxPath(user).toPath()))
return messageNode;
NodeIterator nodeIt = messageNode.getSharedSet();
while (nodeIt.hasNext()) {
Node node = nodeIt.nextNode();
if (node.getPath().startsWith(pathUtil.getWorkspacePath(currentUser).toPath()))
if (node.getPath().startsWith(pathUtil.getInboxPath(user).toPath()))
personalNode = node;
}
if (personalNode == null &&

Loading…
Cancel
Save