setting owner of an full unshared folder to caller

This commit is contained in:
Lucio Lelii 2020-04-14 18:52:20 +02:00
parent 458b8a72ea
commit e82d695bbf
1 changed files with 3 additions and 0 deletions

View File

@ -131,6 +131,9 @@ public class UnshareHandler {
unsharedNode.getNode(NodeProperty.ACCOUNTING.toString()).remove(); unsharedNode.getNode(NodeProperty.ACCOUNTING.toString()).remove();
ses.move(sharedItemNode.getNode(NodeProperty.ACCOUNTING.toString()).getPath(), String.format("%s/%s",unsharedNode.getPath(), NodeProperty.ACCOUNTING.toString())); ses.move(sharedItemNode.getNode(NodeProperty.ACCOUNTING.toString()).getPath(), String.format("%s/%s",unsharedNode.getPath(), NodeProperty.ACCOUNTING.toString()));
//set owner of all the unshared items to the caller
item2Node.updateOwnerOnSubTree(unsharedNode, login);
accountingHandler.createUnshareFolder(sharedItemNode.getProperty(NodeProperty.TITLE.toString()).getString(), "ALL", ses, unsharedNode, false); accountingHandler.createUnshareFolder(sharedItemNode.getProperty(NodeProperty.TITLE.toString()).getString(), "ALL", ses, unsharedNode, false);
ses.save(); ses.save();