2024-09-13 16:42:38 +01:00
|
|
|
package stirling.software.SPDF.EE;
|
|
|
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
2024-11-29 15:11:59 +00:00
|
|
|
import org.springframework.core.Ordered;
|
|
|
|
import org.springframework.core.annotation.Order;
|
2024-09-13 16:42:38 +01:00
|
|
|
|
2024-10-22 12:22:08 +01:00
|
|
|
import lombok.extern.slf4j.Slf4j;
|
2025-02-23 13:36:21 +00:00
|
|
|
|
2024-09-13 16:42:38 +01:00
|
|
|
import stirling.software.SPDF.model.ApplicationProperties;
|
|
|
|
|
|
|
|
@Configuration
|
2024-11-29 15:11:59 +00:00
|
|
|
@Order(Ordered.HIGHEST_PRECEDENCE)
|
2024-10-22 12:22:08 +01:00
|
|
|
@Slf4j
|
2024-09-13 16:42:38 +01:00
|
|
|
public class EEAppConfig {
|
|
|
|
|
2024-12-24 09:52:53 +00:00
|
|
|
private final ApplicationProperties applicationProperties;
|
|
|
|
|
|
|
|
private final LicenseKeyChecker licenseKeyChecker;
|
|
|
|
|
|
|
|
public EEAppConfig(
|
|
|
|
ApplicationProperties applicationProperties, LicenseKeyChecker licenseKeyChecker) {
|
|
|
|
this.applicationProperties = applicationProperties;
|
|
|
|
this.licenseKeyChecker = licenseKeyChecker;
|
|
|
|
}
|
2024-10-14 22:34:41 +01:00
|
|
|
|
|
|
|
@Bean(name = "runningEE")
|
2024-09-13 16:42:38 +01:00
|
|
|
public boolean runningEnterpriseEdition() {
|
2025-01-17 12:25:02 +00:00
|
|
|
return licenseKeyChecker.getEnterpriseEnabledResult();
|
2024-09-13 16:42:38 +01:00
|
|
|
}
|
2025-01-09 14:40:51 +00:00
|
|
|
|
|
|
|
@Bean(name = "SSOAutoLogin")
|
|
|
|
public boolean ssoAutoLogin() {
|
|
|
|
return applicationProperties.getEnterpriseEdition().isSsoAutoLogin();
|
|
|
|
}
|
2024-10-23 07:17:40 -04:00
|
|
|
}
|