Add the email / username of the last user to edit #643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the email / username of the last user to edit a record to the
detail view for authenticated users. Because users can be deleted, this
falls back to the username if the user has been deleted, which is the
functionality provided by the
RecordAuditLogEntry
class. In cases wherethe user was generated using Google authentication, the username is
unlikely to be helpful (e.g. 116570040541971129286) but it will at least
indicate that the user no longer exists.
Testing instructions
http://localhost:7000
modified_by
key that contains the user's email.Extra credit testing
I'm pretty confident these both will work because they're mostly reliant on existing, well-tested functionality, but they may be helpful to familiarize yourself with the application:
http://localhost:7000/editor/
to add a new user with the Public permission, log in with that user, and re-do the steps above. Themodified_by
key should not appear.modified_by
key for that record now matches the user's email. Now delete the user. Confirm that themodified_by
key for that record now matches the user's username.