// make the node shared with the new protection keys
folderIndex.share(context.consumeNewProtectionKeys());
// add read/write user permission of friend
folderIndex.addUserPermissions(context.getUserPermission());
// add write user permission of user itself
folderIndex.addUserPermissions(new UserPermission(userId, PermissionType.WRITE));
}
// upload modified profile
profileManager.readyToPut(userProfile, getID());