if (oldVisibility != Visibility.SANDBOX) {
String msg = md.getModuleInfoAsString() + "cannot be promoted it's not in SANDBOX visibility, it may already have been promoted";
LOGGER.warn(msg);
throw new IllegalArgumentException(msg);
} else {
dao.promoteModuleDescriptorVisibility(md, newVisibility);
WOJServer.getInstance().getContentService().refreshContentForModuleDescriptorVisibilityPromotion(md, oldAccessorId, oldVisibility);
// Notification
notifyModulePromoted(WOJServer.getInstance(), md, newVisibility);
LOGGER.info("Module: " + md.getModuleInfoAsString() + "has been promoted to " + newVisibility);