-
Bogdan Denkovych authored
In https://gitlab.com/gitlab-org/security/gitlab/-/commit/e521e9736b3d2d444d239636f5af780d4df98bcc#a08075e47107d59496393338d2b8a4aef0014955_388_387 and https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/2042/diffs#note_755152255 we added `can?(user, :log_in) && !user.password_expired_if_applicable?` condition to some part of application to prevent users to authenticate if they have expired passwords. To prevent code duplication and make the code more readable this commit suggests extracting this condition into `User#can_log_in_with_non_expired_password?` method.
e9da17c4