diff --git a/src/main/java/org/olat/upgrade/OLATUpgrade_13_0_0.java b/src/main/java/org/olat/upgrade/OLATUpgrade_13_0_0.java index 6862e4783dd41a7383982c40134640091a518a98..0af31ae4fda34ddd954b7722cee2053b5524b148 100644 --- a/src/main/java/org/olat/upgrade/OLATUpgrade_13_0_0.java +++ b/src/main/java/org/olat/upgrade/OLATUpgrade_13_0_0.java @@ -313,7 +313,20 @@ public class OLATUpgrade_13_0_0 extends OLATUpgrade { entry.setAllUsers(false); entry.setGuests(false); } - + + if (isMembersOnly) { + // in this case make sure after the migration the entry is not visible for all authors + log.info("Found membersOnly entry with" + + " cancopy:" + (oldEntry.getCanCopy() ? "t":"f") + + " candownload:" + (oldEntry.getCanDownload() ? "t":"f") + + " canreference:" + (oldEntry.getCanReference() ? "t":"f") + + " setting those all to false to make sure this entry will not be visible for all authors after this migration." + ); + entry.setCanCopy(false); + entry.setCanDownload(false); + entry.setCanReference(false); + } + RepositoryEntryStatusEnum status = RepositoryEntryStatusEnum.preparation; RepositoryEntryAccessUpgradeStatus statusCode = new RepositoryEntryAccessUpgradeStatus(oldEntry.getStatusCode()); if(access == RepositoryEntryAccessUpgrade.DELETED) {