1351
|
|
|
Daniel Manrique |
8 years ago
|
|
|
1350
|
|
|
Ricardo Kirkner |
8 years ago
|
|
|
1349
|
|
|
Natalia B. Bidart |
8 years ago
|
|
|
1348
|
|
|
Ricardo Kirkner |
8 years ago
|
|
|
1347
|
|
|
Ricardo Kirkner |
8 years ago
|
|
|
1346
|
|
|
Ricardo Kirkner |
8 years ago
|
|
|
1345
|
|
|
Natalia |
8 years ago
|
|
|
1344
|
|
|
Daniel Manrique |
8 years ago
|
|
|
1343
|
|
|
Daniel Manrique |
8 years ago
|
|
|
1342
|
|
[r=james-w] Refactor tests to remove assumption that the "raw" token (for AuthTokens) can be retrieved from the database.
The "raw" token is what's sent to the user (e.g. via email) so he can perform the requested action.
This is in preparation for storing only token hashes in the database, instead of "raw" tokens, as requested in bug 1401686.
The work for that feature is getting really big, to make review easier I split it into logical chunks, this is the first one laying the groundwork to make the upcoming one (with actual, interesting new features) shorter.
The raw/hashed feature will be implemented by adding, at AuthToken creation time, a non-db raw_token attribute, which can be used while the object remains in scope, to build URLs or emails. Once the object goes out of scope, raw_token is gone and only the hashed version remains in the database.
High-level explanation of what this code does (just refactoring, no real behavior/implementation changes):
* Methods in emailutils return the created AuthTokens so they can be passed around, mainly for testing. Callers changed to receive two tokens (instead of just one), and emailutils tests updated to use these tokens instead of trying to retrieve them from the database. * The helpers and code which retrieve tokens sent to users were updated to look at mail.outbox instead of getting the "raw" token from the database. Old helpers deleted :) * One instance of access to an Account's authtoken_set changed to go through AuthToken first (since it saves writing one extra helper for child set access).
|
Daniel Manrique |
8 years ago
|
|
|
1341
|
|
|
Natalia |
8 years ago
|
|
|
1340
|
|
|
Natalia |
8 years ago
|
|
|
1339
|
|
|
Natalia |
8 years ago
|
|
|
1338
|
|
|
Natalia |
8 years ago
|
|
|
1337
|
|
|
Natalia |
8 years ago
|
|
|
1336
|
|
|
Daniel Manrique |
8 years ago
|
|
|
1335
|
|
|
Ricardo Kirkner |
8 years ago
|
|
|
1334
|
|
|
Natalia |
8 years ago
|
|
|
1333
|
|
|
Ricardo Kirkner |
8 years ago
|
|
|
1332
|
|
|
Ricardo Kirkner |
8 years ago
|
|
|