if (!confDAO.getValuesAsStrings("authentication.statuses").contains(user.getStatus())) { throw new DisabledException("User " + user.getUsername() + " not allowed to authenticate");
if (!confDAO.getValuesAsStrings("authentication.statuses").contains(user.getStatus())) { throw new DisabledException("User " + user.getUsername() + " not allowed to authenticate");
@PreAuthorize("isAuthenticated() " + "and not(hasRole('" + StandardEntitlement.ANONYMOUS + "')) " + "and not(hasRole('" + StandardEntitlement.MUST_CHANGE_PASSWORD + "'))") public ProvisioningResult<UserTO> selfUpdate(final UserPatch userPatch, final boolean nullPriorityAsync) { UserTO userTO = binder.getAuthenticatedUserTO(); userPatch.setKey(userTO.getKey()); ProvisioningResult<UserTO> updated = doUpdate(userPatch, true, nullPriorityAsync); // Ensures that, if the self update above moves the user into a status from which no authentication // is possible, the existing Access Token is clean up to avoid issues with future authentications if (!confDAO.getValuesAsStrings("authentication.statuses").contains(updated.getEntity().getStatus())) { String accessToken = accessTokenDAO.findByOwner(updated.getEntity().getUsername()).getKey(); if (accessToken != null) { accessTokenDAO.delete(accessToken); } } return updated; }
if (!confDAO.getValuesAsStrings("authentication.statuses").contains(user.getStatus())) { throw new DisabledException("User " + username + " not allowed to authenticate");
if (!confDAO.getValuesAsStrings("authentication.statuses").contains(user.getStatus())) { throw new DisabledException("User " + username + " not allowed to authenticate");