diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-07-11 02:32:17 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-07-11 02:32:17 +0100 |
commit | a4dd4f04293b6ad6dab5d3dc0a4c52a3290b4394 (patch) | |
tree | 8e56f86e0318bd41266ad4cf9178269fe6da4dbb /app/utils.py | |
parent | bf927c50f00bd15c7bc1765b7d5fb0c6a6abeb86 (diff) | |
download | cheatdb-a4dd4f04293b6ad6dab5d3dc0a4c52a3290b4394.tar.xz |
Add audit log
Diffstat (limited to 'app/utils.py')
-rw-r--r-- | app/utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/utils.py b/app/utils.py index 5f47f75..0f5a916 100644 --- a/app/utils.py +++ b/app/utils.py @@ -204,6 +204,11 @@ def addNotification(target, causer, title, url, package=None): db.session.add(notif) +def addAuditLog(severity, causer, title, url, package=None): + entry = AuditLogEntry(causer, severity, title, url, package) + db.session.add(entry) + + def clearNotifications(url): if current_user.is_authenticated: Notification.query.filter_by(user=current_user, url=url).delete() |