From bcc3ef4a22a17cf888e71078f2881715c466b6dc Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Fri, 26 Oct 2018 21:17:41 -0400 Subject: issue: Add logging events for issue open and close Signed-off-by: Malf Furious --- app/model/datamods.php | 1 + app/model/issue.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/model/datamods.php b/app/model/datamods.php index e2051f3..0b7f3da 100644 --- a/app/model/datamods.php +++ b/app/model/datamods.php @@ -112,6 +112,7 @@ if (isAction("dm-issue-add")) $mesg = mesg::initNewDiscussion($form->name, $form->mesg, $user, $pad); $issue = issue::initNew($mesg, $user, $stages[0]); + $log = mesg::initNewLog("%s opened issue", $user, $issue); location(); // bug mitigation } diff --git a/app/model/issue.php b/app/model/issue.php index 2120256..4300bbb 100644 --- a/app/model/issue.php +++ b/app/model/issue.php @@ -51,6 +51,7 @@ if (isAction("iss-mesg-add")) { $issue->close($user); logError(NOTICE, "Issue #" . $issue->numb . " closed"); + $log = mesg::initNewLog("% closed issue", $user, $issue); } } -- cgit v1.2.3 From f041e8a5fed0a1bc9be9aa9665f58e6f5a55879b Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Fri, 26 Oct 2018 21:27:06 -0400 Subject: user: Add log events for some basic user mgmt Signed-off-by: Malf Furious --- app/model/login.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/model/login.php b/app/model/login.php index 6358e12..3393281 100644 --- a/app/model/login.php +++ b/app/model/login.php @@ -32,6 +32,10 @@ if (isAction("login")) $user->validatePasswd($form->passwd))) { logError(ERROR, "Username or password is incorrect"); + + if ($user) + $log = mesg::initNewAdminLog("Failed login for username '%s'", $user); + goto prep; } @@ -72,6 +76,7 @@ if (isAction("signup")) } user::setCurrent($user); + $log = mesg::initNewAdminLog("%s account registered", $user); location("/"); } -- cgit v1.2.3 From 3e0aa02f2051300fbe255c578ed2717a71b65954 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Fri, 26 Oct 2018 21:30:01 -0400 Subject: settings: Add log event when admin alters global settings Signed-off-by: Malf Furious --- app/model/settings.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/model/settings.php b/app/model/settings.php index a3afa0f..3293122 100644 --- a/app/model/settings.php +++ b/app/model/settings.php @@ -137,6 +137,8 @@ if (isAction("settings-admin")) if ($form->smtpPasswd != "") settings::smtpPasswd($form->smtpPasswd); + + $log = mesg::initNewAdminLog("%s changed global settings", $cu); } ?> -- cgit v1.2.3