Issue #7 closed

Impersonation log

Peter Sanchez
repo owner created an issue

Create a log model to track impersonations. Log when they impersonate and when they end the impersonation.

Maybe have an inline in the admin so you can see both from the same screen.

Comments (9)

  1. Peter Sanchez reporter

    You'd be a personal hero of mine. I don't have any requirements but from what I was thinking it could probably be an optional thing that is tied to signals. So a new setting, if True, it connects the begin/end signals with a couple of utility functions that creates, or updates, a log entry.

    Log entry should be who is doing the impersonating, when they started, who they are impersonating, and when they end the impersonation. Not sure if it should be a single data entry or not, but I think it's best if it is. The end impersonation utility function is smart enough to figure out the current log entry and "close" it.

    I think a simple ModelAdmin admin that displays the important information on the list screen is good enough, maybe provide some filters to filter for user's starting the impersonation.

    Does that make sense?

    Edit: Some typo's (probably missed many others)

  2. Peter Sanchez reporter

    Not quite. There are still issues. For instance, 1.7 doesn't have DurationField. I've decided to make this the cornerstone of a 1.0 release and drop support for Django < 1.7, since Django itself has already done that.

    So I need to make some adjustments but it's all good. I'm working on it

  3. Log in to comment