use of org.olat.core.gui.control.navigation.SiteConfiguration in project OpenOLAT by OpenOLAT.
the class SitesConfigurationController method doSaveSettings.
private void doSaveSettings() {
int count = 0;
List<SiteConfiguration> configs = new ArrayList<SiteConfiguration>();
for (SiteDefRow row : model.getObjects()) {
SiteConfiguration config = row.getRawConfiguration(true);
config.setOrder(count++);
configs.add(config);
}
sitesModule.setSitesConfiguration(configs);
}
use of org.olat.core.gui.control.navigation.SiteConfiguration in project OpenOLAT by OpenOLAT.
the class SitesConfigurationController method doUpdateOrders.
private void doUpdateOrders() {
int count = 0;
List<SiteConfiguration> configs = new ArrayList<SiteConfiguration>();
for (SiteDefRow row : model.getObjects()) {
SiteConfiguration config = row.getRawConfiguration(false);
config.setOrder(count++);
configs.add(config);
}
sitesModule.setSitesConfiguration(configs);
}
use of org.olat.core.gui.control.navigation.SiteConfiguration in project openolat by klemens.
the class CatalogContextEntryControllerCreator method isCatalogSiteVisible.
private boolean isCatalogSiteVisible(UserRequest ureq) {
if (repositoryModule.isCatalogEnabled() && repositoryModule.isCatalogSiteEnabled()) {
try {
CatalogSiteDef siteDef = CoreSpringFactory.getImpl(CatalogSiteDef.class);
SiteDefinitions siteDefinitions = CoreSpringFactory.getImpl(SiteDefinitions.class);
SiteConfiguration config = siteDefinitions.getConfigurationSite(siteDef);
if (config != null && StringHelper.containsNonWhitespace(config.getSecurityCallbackBeanId())) {
String secCallbackBeanId = config.getSecurityCallbackBeanId();
Object siteSecCallback = CoreSpringFactory.getBean(secCallbackBeanId);
if (siteSecCallback instanceof SiteSecurityCallback && !((SiteSecurityCallback) siteSecCallback).isAllowedToLaunchSite(ureq)) {
return false;
}
}
} catch (Exception e) {
log.error("Cannot find if the user is allowed to launch the catalog.", e);
}
return true;
} else {
return false;
}
}
Aggregations