More gdpr fixes

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2019-08-20 19:08:31 +02:00
parent 874fb36d6b
commit 3550987087
19 changed files with 99 additions and 23 deletions

View File

@ -45,6 +45,7 @@ server {
rewrite /message.php /index.php?route=message/view; rewrite /message.php /index.php?route=message/view;
rewrite /bulkrestore.php /index.php?route=message/bulkrestore; rewrite /bulkrestore.php /index.php?route=message/bulkrestore;
rewrite /bulkremove.php /index.php?route=message/bulkremove; rewrite /bulkremove.php /index.php?route=message/bulkremove;
rewrite /rejectremove.php /index.php?route=message/rejectremove;
rewrite /bulkpdf.php /index.php?route=message/bulkpdf; rewrite /bulkpdf.php /index.php?route=message/bulkpdf;
rewrite /folders.php /index.php?route=folder/list&; rewrite /folders.php /index.php?route=folder/list&;
rewrite /settings.php /index.php?route=user/settings; rewrite /settings.php /index.php?route=user/settings;

View File

@ -9,6 +9,7 @@ RewriteRule ^audit-helper.php /index.php?route=audit/helper [L]
RewriteRule ^message.php /index.php?route=message/view [L] RewriteRule ^message.php /index.php?route=message/view [L]
RewriteRule ^bulkrestore.php /index.php?route=message/bulkrestore [L] RewriteRule ^bulkrestore.php /index.php?route=message/bulkrestore [L]
RewriteRule ^bulkremove.php /index.php?route=message/bulkremove [L] RewriteRule ^bulkremove.php /index.php?route=message/bulkremove [L]
RewriteRule ^rejectremove.php /index.php?route=message/rejectremove [L]
RewriteRule ^bulkpdf.php /index.php?route=message/bulkpdf [L] RewriteRule ^bulkpdf.php /index.php?route=message/bulkpdf [L]
RewriteRule ^folders.php /index.php?route=folder/list& [QSA,L] RewriteRule ^folders.php /index.php?route=folder/list& [QSA,L]
RewriteRule ^settings.php /index.php?route=user/settings [L] RewriteRule ^settings.php /index.php?route=user/settings [L]

View File

@ -75,7 +75,7 @@ class ControllerLoginLogin extends Controller {
if(isAdminUser() == 1) { if(isAdminUser() == 1) {
header("Location: " . SITE_URL . "index.php?route=health/health"); header("Location: " . SITE_URL . "index.php?route=health/health");
exit; exit;
} else ifisAdminUser() == 4) { } else if(isDataOfficer() == 1) {
header("Location: " . SITE_URL . "index.php?route=audit/removal"); header("Location: " . SITE_URL . "index.php?route=audit/removal");
exit; exit;
} }

View File

@ -0,0 +1,46 @@
<?php
class ControllerMessageRejectRemove extends Controller {
public function index(){
$this->id = "content";
$this->template = "audit/remove.tpl";
$this->layout = "common/layout";
$session = Registry::get('session');
$request = Registry::get('request');
$db = Registry::get('db');
$this->load->model('search/search');
$this->load->model('search/message');
$this->load->model('user/user');
$this->document->title = $this->data['text_message'];
if(!isset($this->request->post['id']) || $this->request->post['id'] == '') { die("no id parameter given"); }
if(!isset($this->request->post['confirmed']) || $this->request->post['confirmed'] != 1) { die("not confirmed"); }
if(!isset($this->request->post['reason2']) || $this->request->post['reason2'] == '') { die("no reason2 parameter given"); }
$id = (int)$this->request->post['id'];
if(!$this->model_search_search->check_your_permission_by_id($id)) {
die("no permission for $id");
}
$this->data['username'] = Registry::get('username');
if(Registry::get('data_officer') == 0) {
die("go away");
}
// Shouldn't we ask for a token or something as well?
$db->query("UPDATE " . TABLE_DELETED . " SET deleted=0, date2=?, reason2=? WHERE id=?", [NOW, $this->request->post['reason2'], $id]);
syslog(LOG_INFO, $this->data['username'] . " rejected removing message: $id");
$this->render();
}
}

View File

@ -484,4 +484,6 @@ $_['text_private'] = "Private";
$_['text_delete_reason'] = "Reason of removal"; $_['text_delete_reason'] = "Reason of removal";
$_['text_need_to_approve_removal'] = "Need to approve removal"; $_['text_need_to_approve_removal'] = "Need to approve removal";
$_['text_deleted'] = "Deleted"; $_['text_deleted'] = "Deleted";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";

View File

@ -491,4 +491,6 @@ $_['text_private'] = "Privat";
$_['text_delete_reason'] = "Reason of removal"; $_['text_delete_reason'] = "Reason of removal";
$_['text_need_to_approve_removal'] = "Need to approve removal"; $_['text_need_to_approve_removal'] = "Need to approve removal";
$_['text_deleted'] = "Deleted"; $_['text_deleted'] = "Deleted";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";

View File

@ -284,6 +284,8 @@ $_['text_recipient'] = "Recipient";
$_['text_ref'] = "Reference"; $_['text_ref'] = "Reference";
$_['text_refresh_period'] = "Refresh period"; $_['text_refresh_period'] = "Refresh period";
$_['text_refresh_qr_code'] = "Refresh QR code"; $_['text_refresh_qr_code'] = "Refresh QR code";
$_['text_reject'] = "Reject";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_relay_details'] = "Relay details"; $_['text_relay_details'] = "Relay details";
$_['text_relay_status'] = "Relay status"; $_['text_relay_status'] = "Relay status";
$_['text_remove'] = "Remove"; $_['text_remove'] = "Remove";

View File

@ -489,4 +489,6 @@ $_['text_private'] = "Private";
$_['text_delete_reason'] = "Reason of removal"; $_['text_delete_reason'] = "Reason of removal";
$_['text_need_to_approve_removal'] = "Need to approve removal"; $_['text_need_to_approve_removal'] = "Need to approve removal";
$_['text_deleted'] = "Deleted"; $_['text_deleted'] = "Deleted";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";

View File

@ -486,4 +486,6 @@ $_['text_private'] = "Private";
$_['text_delete_reason'] = "Reason of removal"; $_['text_delete_reason'] = "Reason of removal";
$_['text_need_to_approve_removal'] = "Need to approve removal"; $_['text_need_to_approve_removal'] = "Need to approve removal";
$_['text_deleted'] = "Deleted"; $_['text_deleted'] = "Deleted";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";

View File

@ -281,10 +281,12 @@ $_['text_queue_status'] = "Queue státusz";
$_['text_quick_search'] = "Gyorskeresés"; $_['text_quick_search'] = "Gyorskeresés";
$_['text_realname'] = "Név"; $_['text_realname'] = "Név";
$_['text_reason_of_rejection'] = "Elutasítás oka";
$_['text_recipient'] = "Címzett"; $_['text_recipient'] = "Címzett";
$_['text_ref'] = "Hivatkozás"; $_['text_ref'] = "Hivatkozás";
$_['text_refresh_period'] = "Frissítési periódus"; $_['text_refresh_period'] = "Frissítési periódus";
$_['text_refresh_qr_code'] = "QR kód frissítése"; $_['text_refresh_qr_code'] = "QR kód frissítése";
$_['text_reject'] = "Elutasítás";
$_['text_relay_details'] = "Relay részletek"; $_['text_relay_details'] = "Relay részletek";
$_['text_relay_status'] = "Relay státusz"; $_['text_relay_status'] = "Relay státusz";
$_['text_remove'] = "Törlés"; $_['text_remove'] = "Törlés";

View File

@ -486,4 +486,6 @@ $_['text_private'] = "Private";
$_['text_delete_reason'] = "Reason of removal"; $_['text_delete_reason'] = "Reason of removal";
$_['text_need_to_approve_removal'] = "Need to approve removal"; $_['text_need_to_approve_removal'] = "Need to approve removal";
$_['text_deleted'] = "Deleted"; $_['text_deleted'] = "Deleted";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";

View File

@ -479,4 +479,6 @@ $_['text_private'] = "Private";
$_['text_delete_reason'] = "Reason of removal"; $_['text_delete_reason'] = "Reason of removal";
$_['text_need_to_approve_removal'] = "Need to approve removal"; $_['text_need_to_approve_removal'] = "Need to approve removal";
$_['text_deleted'] = "Deleted"; $_['text_deleted'] = "Deleted";
$_['text_reject'] = "Reject";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";

View File

@ -487,4 +487,6 @@ $_['text_private'] = "Private";
$_['text_delete_reason'] = "Reason of removal"; $_['text_delete_reason'] = "Reason of removal";
$_['text_need_to_approve_removal'] = "Need to approve removal"; $_['text_need_to_approve_removal'] = "Need to approve removal";
$_['text_deleted'] = "Deleted"; $_['text_deleted'] = "Deleted";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";

View File

@ -487,4 +487,6 @@ $_['text_private'] = "Private";
$_['text_delete_reason'] = "Reason of removal"; $_['text_delete_reason'] = "Reason of removal";
$_['text_need_to_approve_removal'] = "Need to approve removal"; $_['text_need_to_approve_removal'] = "Need to approve removal";
$_['text_deleted'] = "Deleted"; $_['text_deleted'] = "Deleted";
$_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";

View File

@ -385,6 +385,23 @@ var Piler =
}, },
reject_removing_message:function(id, reason2)
{
Piler.log("[reject_removing_message]", id, reason2);
Piler.poor_mans_keepalive_for_dummy_browsers();
jQuery.ajax('/index.php?route=message/rejectremove', {
data: { id: id, confirmed: 1, reason2: reason2 },
type: "POST"
})
.done( function( a ) {})
.fail(function( a, b ) { alert("Problem retrieving XML data:" + b) });
$('#delete-rejected-modal').modal('hide')
},
bulk_restore_messages:function(msg, email) bulk_restore_messages:function(msg, email)
{ {
Piler.log("[bulk_restore_messages]", email); Piler.log("[bulk_restore_messages]", email);

View File

@ -20,11 +20,8 @@
<style>body{padding-top:70px;}</style> <style>body{padding-top:70px;}</style>
<![endif]--> <![endif]-->
<script type="text/javascript" src="/view/javascript/jquery.min.js"></script> <?php print JS_CODE; ?>
<script type="text/javascript" src="/view/javascript/jquery-ui-custom.min.js"></script>
<script type="text/javascript" src="/view/javascript/rc-splitter.js"></script>
<script type="text/javascript" src="/view/theme/default/assets/js/bootstrap.js"></script>
<script type="text/javascript" src="/view/javascript/piler.js"></script>
<!-- Fav and touch icons --> <!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/view/theme/default/assets/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/view/theme/default/assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/view/theme/default/assets/ico/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/view/theme/default/assets/ico/apple-touch-icon-114-precomposed.png">

View File

@ -28,11 +28,7 @@
<link rel="apple-touch-icon-precomposed" href="/view/theme/default/assets/ico/apple-touch-icon-57-precomposed.png"> <link rel="apple-touch-icon-precomposed" href="/view/theme/default/assets/ico/apple-touch-icon-57-precomposed.png">
<?php if(BRANDING_FAVICON) { ?><link rel="shortcut icon" href="<?php print BRANDING_FAVICON; ?>" /><?php } ?> <?php if(BRANDING_FAVICON) { ?><link rel="shortcut icon" href="<?php print BRANDING_FAVICON; ?>" /><?php } ?>
<script type="text/javascript" src="/view/javascript/jquery.min.js"></script> <?php print JS_CODE; ?>
<script type="text/javascript" src="/view/javascript/jquery-ui-custom.min.js"></script>
<script type="text/javascript" src="/view/javascript/rc-splitter.js"></script>
<script type="text/javascript" src="/view/theme/default/assets/js/bootstrap.js"></script>
<script type="text/javascript" src="/view/javascript/piler.js"></script>
</head> </head>
<body onload="Piler.add_shortcuts();"> <body onload="Piler.add_shortcuts();">

View File

@ -19,13 +19,11 @@
<script src="/view/theme/default/assets/js/html5.js"></script> <script src="/view/theme/default/assets/js/html5.js"></script>
<![endif]--> <![endif]-->
<script type="text/javascript" src="/view/javascript/jquery.min.js"></script> <?php print JS_CODE; ?>
<script type="text/javascript" src="/view/javascript/jquery-ui-custom.min.js"></script>
<script type="text/javascript" src="/view/javascript/jscolor.js"></script> <script type="text/javascript" src="/view/javascript/jscolor.js"></script>
<script type="text/javascript" src="/view/javascript/fileupload.js"></script> <script type="text/javascript" src="/view/javascript/fileupload.js"></script>
<script type="text/javascript" src="/view/javascript/rc-splitter.js"></script>
<script type="text/javascript" src="/view/theme/default/assets/js/bootstrap.js"></script>
<script type="text/javascript" src="/view/javascript/piler.js"></script>
<!-- Fav and touch icons --> <!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/view/theme/default/assets/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/view/theme/default/assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/view/theme/default/assets/ico/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/view/theme/default/assets/ico/apple-touch-icon-114-precomposed.png">