You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/04/13 09:48:37 UTC
[GitHub] [cloudstack] weizhouapache commented on a diff in pull request #6254: Fix: Allow disabling the login attempts mechanism for disabling users
weizhouapache commented on code in PR #6254:
URL: https://github.com/apache/cloudstack/pull/6254#discussion_r849294630
##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -2565,6 +2556,22 @@ private UserAccount getUserAccount(String username, String password, Long domain
}
}
+ protected void updateLoginAttemptsWhenIncorrectLoginAttemptsEnabled(UserAccount account, boolean updateIncorrectLoginCount,
+ int allowedLoginAttempts) {
+ int attemptsMade = account.getLoginAttempts() + 1;
+ if (allowedLoginAttempts > 0 && updateIncorrectLoginCount) {
Review Comment:
@nvazquez
just a suggestion: check the opposite conditions to reduce indent ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org