Skip to content

Commit

Permalink
MID-2884 fix for "disabled" - not authorized user
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Apr 28, 2016
1 parent a83d5b3 commit 373ec40
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -30,6 +30,7 @@
import org.springframework.security.authentication.DisabledException;
import org.springframework.security.authentication.LockedException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken;
import org.springframework.stereotype.Component;
Expand Down Expand Up @@ -118,7 +119,7 @@ public UsernamePasswordAuthenticationToken authenticateUserPassword(ConnectionEn
// Authorizations
if (!hasAnyAuthorization(principal)) {
recordAuthenticationFailure(principal, connEnv, "no authorizations");
throw new AccessDeniedException("web.security.provider.access.denied");
throw new DisabledException("web.security.provider.access.denied");
}

// Password age
Expand Down

0 comments on commit 373ec40

Please sign in to comment.