Review main Merged Breaking

67137[!!!][BUGFIX] Do not cache a BE users' group list

Benni Mack CR +2 V +2 Hard +234 −171 updated 12/15/20, 17:16

Commit message

When a user logs in, the "cache" field "usergroup_cached_list"
is updated in the be_users table.

This value is used so the groups do not need to be recalculated
each time for each user (e.g. in Workspaces when sending
notifications and in Log module).

However, this has serious flaws:
1) If an admin removes a previously active user from a BE
   group, the cached list still contains the old group, until
   the user logs in
2) If a user never logged in before, the list is empty

This change removes this conceptual bug, and builds this
into the GroupResolver to use direct (optimized) DB queries
for these use cases, making the DB field obsolete.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 8