• 
      

    Frequently update the last login time for users to reflect activity.

    Review Request #10137 — Created Sept. 4, 2018 and submitted

    Information

    Review Board
    release-3.0.x
    d0c7b9c...

    Reviewers

    User.last_login stores the last time that a user went through a login
    process, but given how long our sessions last, it's hard to get any
    useful information on how often users are active on a server. This
    change aims to improve upon this by repurposing this field to better
    show recent activity.

    Now, on each request, the new UpdateLastLoginMiddleware will check if
    the last login time is at least 30 minutes old and update it to the
    current time. This means that login times will now represent activity on
    the server within a 30 minute window, making the User Activity graph on
    the Admin Dashboard more useful and helping when calculating usage for
    support contracts.

    Unit tests passed.

    Manually tested that the last login time was updated when making a HTTP
    request, and then didn't update again until a request over 30 minutes
    later.

    brennie
    1. Ship It!
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (c3f91fa)