@Test public void validateFormReturnsFalseWhenUserNotFound() { assertFalse(this.disableStrategy.validateForm("Foo", null)); }
@Override public boolean validateForm(String username, SecurityRequestWrapper request) { DocumentReference userDocumentReference = this.authenticationFailureManager.get().findUser(username); if (userDocumentReference != null) { return !new XWikiUser(userDocumentReference).isDisabled(this.contextProvider.get()); } return false; }
DisableAccountFailureStrategy implements AuthenticationFailureStrategy, EventListener { @Override public boolean validateForm(String username, SecurityRequestWrapper request) { DocumentReference userDocumentReference = this.authenticationFailureManager.get().findUser(username); if (userDocumentReference != null) { return !new XWikiUser(userDocumentReference).isDisabled(this.contextProvider.get()); } return false; } }
DisableAccountFailureStrategy implements AuthenticationFailureStrategy, EventListener { @Override public boolean validateForm(String username, SecurityRequestWrapper request) { DocumentReference userDocumentReference = this.authenticationFailureManager.get().findUser(username); if (userDocumentReference != null) { return !new XWikiUser(userDocumentReference).isDisabled(this.contextProvider.get()); } return false; }  }
DisableAccountFailureStrategy implements AuthenticationFailureStrategy, EventListener { @Override public boolean validateForm(String username, SecurityRequestWrapper request) { DocumentReference userDocumentReference = this.authenticationFailureManager.get().findUser(username); if (userDocumentReference != null) { return !new XWikiUser(userDocumentReference).isDisabled(this.contextProvider.get()); } return false; }  @Override String getErrorMessage(String username); @Override String getForm(String username); @Override boolean validateForm(String username, SecurityRequestWrapper request); @Override void notify(String username); @Override List<Event> getEvents(); @Override String getName(); @Override void onEvent(Event event, Object source, Object data); }
DisableAccountFailureStrategy implements AuthenticationFailureStrategy, EventListener { @Override public boolean validateForm(String username, SecurityRequestWrapper request) { DocumentReference userDocumentReference = this.authenticationFailureManager.get().findUser(username); if (userDocumentReference != null) { return !new XWikiUser(userDocumentReference).isDisabled(this.contextProvider.get()); } return false; }  @Override String getErrorMessage(String username); @Override String getForm(String username); @Override boolean validateForm(String username, SecurityRequestWrapper request); @Override void notify(String username); @Override List<Event> getEvents(); @Override String getName(); @Override void onEvent(Event event, Object source, Object data); static final String NAME; }