Create an audit entry in case of rejecting the removal of the message

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2021-04-26 06:30:14 +02:00
parent 6c68a25b63
commit 98b4c3c387
13 changed files with 17 additions and 1 deletions

View File

@ -495,6 +495,7 @@ define('ACTION_VIEW_JOURNAL', 17);
define('ACTION_NOT_SPAM', 18);
define('ACTION_MARK_AS_PRIVATE', 19);
define('ACTION_MARK_MESSAGE_FOR_REMOVAL', 20);
define('ACTION_REJECT_REMOVAL', 21);
$actions = array(
'unknown' => 1,
@ -509,7 +510,9 @@ $actions = array(
'save_search' => 11,
'download_attachment' => 15,
'journal' => 17,
'private' => 19
'private' => 19,
'marked_for_removal', 20,
'reject_removal', 21
);

View File

@ -66,6 +66,7 @@ class ControllerAuditHelper extends Controller {
$this->data['actions'][ACTION_VIEW_JOURNAL] = $this->data['text_view_journal'];
$this->data['actions'][ACTION_MARK_MESSAGE_FOR_REMOVAL] = $this->data['text_remove_request'];
$this->data['actions'][ACTION_MARK_AS_PRIVATE] = $this->data['text_mark_private'];
$this->data['actions'][ACTION_REJECT_REMOVAL] = $this->data['text_reject_removal'];

View File

@ -37,6 +37,8 @@ class ControllerMessageRejectRemove extends Controller {
// Shouldn't we ask for a token or something as well?
AUDIT(ACTION_REJECT_REMOVAL, '', '', $id, '');
$db->query("UPDATE " . TABLE_DELETED . " SET deleted=0, approver=?, date2=?, reason2=? WHERE id=?", [$this->data['username'], NOW, $this->request->post['reason2'], $id]);
syslog(LOG_INFO, $this->data['username'] . " rejected removing message: $id");

View File

@ -494,3 +494,4 @@ $_['text_create_note'] = "Create note";
$_['text_wildcard_domains'] = "Wildcard domains";
$_['text_remove_request'] = "remove request";
$_['text_rejected_removal'] = "rejected removal";

View File

@ -501,3 +501,4 @@ $_['text_create_note'] = "Create note";
$_['text_wildcard_domains'] = "Wildcard domains";
$_['text_remove_request'] = "remove request";
$_['text_rejected_removal'] = "rejected removal";

View File

@ -288,6 +288,7 @@ $_['text_ref'] = "Reference";
$_['text_refresh_period'] = "Refresh period";
$_['text_refresh_qr_code'] = "Refresh QR code";
$_['text_reject'] = "Reject";
$_['text_rejected_removal'] = "rejected removal";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_relay_details'] = "Relay details";
$_['text_relay_status'] = "Relay status";

View File

@ -499,3 +499,4 @@ $_['text_create_note'] = "Create note";
$_['text_wildcard_domains'] = "Wildcard domains";
$_['text_remove_request'] = "remove request";
$_['text_rejected_removal'] = "rejected removal";

View File

@ -496,3 +496,4 @@ $_['text_create_note'] = "Create note";
$_['text_wildcard_domains'] = "Wildcard domains";
$_['text_remove_request'] = "remove request";
$_['text_rejected_removal'] = "rejected removal";

View File

@ -290,6 +290,7 @@ $_['text_ref'] = "Hivatkozás";
$_['text_refresh_period'] = "Frissítési periódus";
$_['text_refresh_qr_code'] = "QR kód frissítése";
$_['text_reject'] = "Elutasítás";
$_['text_rejected_removal'] = "törlés elutasítva";
$_['text_relay_details'] = "Relay részletek";
$_['text_relay_status'] = "Relay státusz";
$_['text_remove'] = "Törlés";

View File

@ -495,3 +495,4 @@ $_['text_no_selected_message'] = "no selected message";
$_['text_create_note'] = "Create note";
$_['text_wildcard_domains'] = "Wildcard domains";
$_['text_remove_request'] = "remove request";
$_['text_rejected_removal'] = "rejected removal";

View File

@ -488,3 +488,4 @@ $_['text_create_note'] = "Create note";
$_['text_wildcard_domains'] = "Wildcard domains";
$_['text_remove_request'] = "remove request";
$_['text_rejected_removal'] = "rejected removal";

View File

@ -497,3 +497,4 @@ $_['text_create_note'] = "Create note";
$_['text_wildcard_domains'] = "Wildcard domains";
$_['text_remove_request'] = "remove request";
$_['text_rejected_removal'] = "rejected removal";

View File

@ -497,3 +497,4 @@ $_['text_create_note'] = "Create note";
$_['text_wildcard_domains'] = "Wildcard domains";
$_['text_remove_request'] = "remove request";
$_['text_rejected_removal'] = "rejected removal";