Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPAL-1126 Remove check which fails if lastLogin > 5 years ago #1292

Merged
merged 1 commit into from Jan 4, 2023

Commits on Jan 4, 2023

  1. Remove check which fails if lastLogin > 5 years ago

    Unit tests were failing because of a condition which sets the
    last login for the user to 'now' if the supplied last login
    datetime is more than 5 years ago. This was tripped when we
    passed 2023-01-04, as some of the tests set the last login
    date to 2018-01-02.
    
    Remove this condition and instead set a default lastLogin if one
    is not available for a user during an authentication attempt.
    Also allow the lastLogin to be null when constructing a User,
    and default to 'now' if this is the case. As we only construct
    users in LpaAuthAdapter, we shouldn't hit this case, but it is
    covered anyway.
    
    In LpaAuthAdapter, default the last login to null if the user
    doesn't have one. Then, when constructing the last login datetime,
    a null value will mean we default to 'now'.
    Elliot Smith committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    7dc4273 View commit details
    Browse the repository at this point in the history