Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Debian New Member Process
contributors.debian.org
Commits
2710c64f
Verified
Commit
2710c64f
authored
Jan 10, 2021
by
Mattia Rizzolo
Browse files
signon: add an appropriate audit trail for edits from the admin site
Signed-off-by:
Mattia Rizzolo
<
mattia@debian.org
>
parent
7d0fa272
Changes
1
Hide whitespace changes
Inline
Side-by-side
signon/admin.py
View file @
2710c64f
...
...
@@ -8,3 +8,9 @@ class IdentityAdmin(admin.ModelAdmin):
"username"
,
"person__fullname"
,
"person__email"
,
)
def
save_model
(
self
,
request
,
obj
,
form
,
change
):
"""
Given a model instance save it to the database.
"""
obj
.
save
(
audit_author
=
request
.
user
,
audit_notes
=
"edited from admin"
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment