Skip to content

Add session versioning using a last change timestamp

Fridtjof requested to merge session-update-timestamps into master

Closes #1031 (closed)

What does this MR do?

Introduces session versioning by keeping track in the session of when it was last updated from the database. By changing LAST_SESSION_SCHEMA_CHANGE, we can force updating the session for any user that was logged in before the change (like adding a new field) happened.

How confident are you it won't break things if deployed?

should be good to go

How to test

Steps a reviewer can take to verify that this MR does what it says it does e.g.

  1. Checkout branch locally
  2. Login as anyone
  3. increase LAST_SESSION_SCHEMA_CHANGE
  4. Visit any page
  5. Check the queries section in the debug toolbar, and see if refreshFromDatabase was called (based on the queries it would execute)

Checklist

  • Can't test this, any user logging in will already be up to date with their session, and LAST_SESSION_SCHEMA_CHANGE can't be updated easily in a test
  • no unrelated changes
  • asked someone for a code review
  • set a "for:" label to indicate who will be affected by this change
  • use "state:" labels to track this MR's state until it was beta tested
  • added an entry to CHANGELOG.md
  • add a short text that can be used in the release notes (Internal, not user-visible fix for a bug that was not present before this release)
  • Once your MR has been merged, you are responsible to create a testing issue in Beta Testing Repo:
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...). how this change can be tested.
    • Be aware, that also non technical people should understand.
Edited by Christian Walgenbach

Merge request reports