hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
46 stars 14 forks source link

Store LTIUser & HUser data in LMS's DB #2853

Closed marcospri closed 2 years ago

marcospri commented 3 years ago

Both LTIUser and HUser are currently NamedTuple models but are not persisted on the DB

Store all the info currently held at runtime by LTIUser and HUser into one or two DB tables

Related tickets:

What are we going to store?

Final list:

When is user data available?

Users objects are created in three scenarios we've spotted so far:

The first two could probably be intercepted in h.secutity in a single place?

How are we going to store it?

One approach is to simply store the information. This would mean it was available in the DB, but wasn't necessarily available at run time.

Another approach is to make sure the user data is updated and returned for the application to inspect. At the moment this wouldn't result in any information the app doesn't already have. But it would be extremely useful if we chose to add user preferences one day. This could be in a user service which you provide details and it gives you back a user object. As a side effect it also updates the data creating a record. At the moment this "side effect" would be the only effect we are interested in, but it would stage us well in the future.

jon-betts commented 2 years ago

Done! We're now storing basic (non identifying) details about users