new: [event locks] have an option to disable them

- it's annoying and causes headaches
- as discussed in #8204
pull/8277/head v2.4.157
iglocska 2022-03-25 08:52:51 +01:00
parent d1e661ffe0
commit f4e390ae27
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 17 additions and 1 deletions

View File

@ -4683,6 +4683,14 @@ class Server extends AppModel
'type' => 'numeric',
'null' => true
),
'disable_event_locks' => [
'level' => 1,
'description' => __('Disable the event locks that are executed periodically when a user browses an event view. It can be useful to leave event locks enabled to warn users that someone else is editing the same event, but generally it\'s extremely verbose and can cause issues in certain setups, so it\'s recommended to disable this.'),
'value' => false,
'test' => 'testBoolTrue',
'type' => 'boolean',
'null' => true
],
'enable_advanced_correlations' => array(
'level' => 0,
'description' => __('Enable some performance heavy correlations (currently CIDR correlation)'),

View File

@ -68,7 +68,15 @@
<script type="text/javascript">
var showContext = false;
$(function () {
queryEventLock('<?= h($event['Event']['id']); ?>', <?= (int)$event['Event']['timestamp'] ?>);
<?php
if (!Configure::check('MISP.disable_event_locks') || !Configure::read('MISP.disable_event_locks')) {
echo sprintf(
"queryEventLock('%s', %s);",
h($event['Event']['id']),
(int)$event['Event']['timestamp']
);
}
?>
popoverStartup();
$(document.body).tooltip({