/** * Only enable registration if: * 1) the user has enabled it via configuration and * 2) the application has been mapped with a default account store. * * @param request current request - ignored in this implementation * @param response current response - ignored in this implementation * @return true if registerEnabled is true and the application has a default account store. * @see <a href="https://github.com/stormpath/stormpath-sdk-java/issues/333">Issue 333</a> * @see <a href="https://github.com/stormpath/stormpath-sdk-java/issues/772">Issue 772</a> * @since 1.0.0 */ @Override public Boolean get(HttpServletRequest request, HttpServletResponse response) { if (!this.registerEnabled) { return false; } final Application application = applicationResolver.getApplication(request); return predicate.test(true, application); } }
/** * Only enable registration if: * 1) the user has enabled it via configuration and * 2) the application has been mapped with a default account store. * * @param request current request - ignored in this implementation * @param response current response - ignored in this implementation * @return true if registerEnabled is true and the application has a default account store. * @see <a href="https://github.com/stormpath/stormpath-sdk-java/issues/333">Issue 333</a> * @see <a href="https://github.com/stormpath/stormpath-sdk-java/issues/772">Issue 772</a> * @since 1.0.0 */ @Override public Boolean get(HttpServletRequest request, HttpServletResponse response) { if (!this.registerEnabled) { return false; } final Application application = applicationResolver.getApplication(request); return predicate.test(true, application); } }
boolean registerChainSpecified = false; boolean registerEnabled = config.getRegisterConfig().isEnabled(); registerEnabled = config.getRegisterEnabledPredicate().test(registerEnabled, config.getApplicationResolver().getApplication(servletContext));
boolean registerChainSpecified = false; boolean registerEnabled = config.getRegisterConfig().isEnabled(); registerEnabled = config.getRegisterEnabledPredicate().test(registerEnabled, config.getApplicationResolver().getApplication(servletContext));
if (stormpathRegisterEnabledPredicate().test(registerEnabled, application)) { addFilter(mgr, stormpathRegisterController(), stormpathRegisterConfig());
if (stormpathRegisterEnabledPredicate().test(registerEnabled, application)) { addFilter(mgr, stormpathRegisterController(), stormpathRegisterConfig());