public boolean isSecurityEnabled() { return nexusConfiguration.isSecurityEnabled(); }
@Override protected boolean shouldNotFilter( ServletRequest request ) throws ServletException { return !( (NexusConfiguration) getAttribute( NexusConfiguration.class.getName() ) ).isSecurityEnabled(); }
/** * Externalized Nexus object to DTO's conversion, using current Nexus configuration. * * @param resource */ protected void fillCurrentConfiguration( Request request, GlobalConfigurationResource resource ) { resource.setSecurityEnabled( getNexusConfiguration().isSecurityEnabled() ); resource.setSecurityAnonymousAccessEnabled( getNexusConfiguration().isAnonymousAccessEnabled() ); resource.setSecurityRealms( getNexusConfiguration().getRealms() ); resource.setSecurityAnonymousUsername( getNexusConfiguration().getAnonymousUsername() ); resource.setSecurityAnonymousPassword( PASSWORD_PLACE_HOLDER ); resource.setGlobalConnectionSettings( convert( getGlobalRemoteConnectionSettings() ) ); resource.setGlobalHttpProxySettings( convert( getGlobalHttpProxySettings() ) ); RestApiSettings restApiSettings = convert( getGlobalRestApiSettings() ); if ( restApiSettings != null && StringUtils.isEmpty( restApiSettings.getBaseUrl() ) ) { restApiSettings.setBaseUrl( getContextRoot( request ).getTargetRef().toString() ); } resource.setGlobalRestApiSettings( restApiSettings ); resource.setSmtpSettings( convert( getNexusEmailer() ) ); resource.setErrorReportingSettings( convert( getErrorReportingManager() ) ); resource.setSystemNotificationSettings( convert( notificationManager ) ); }