mirror of https://github.com/MISP/MISP
new: [privacy] filter added for the authkeys in the admin section to make giving trainings easier
parent
aed771ef4a
commit
45e42ca84f
|
@ -46,7 +46,7 @@ class AppController extends Controller
|
|||
|
||||
public $helpers = array('Utility', 'OrgImg', 'FontAwesome', 'UserName', 'DataPathCollector');
|
||||
|
||||
private $__queryVersion = '103';
|
||||
private $__queryVersion = '104';
|
||||
public $pyMispVersion = '2.4.123';
|
||||
public $phpmin = '7.2';
|
||||
public $phprec = '7.4';
|
||||
|
|
|
@ -19,6 +19,12 @@
|
|||
$data = '';
|
||||
} else {
|
||||
$data = h($data);
|
||||
if (!empty($field['privacy'])) {
|
||||
$data = sprintf(
|
||||
'<span class="privacy-value" data-hidden-value="%s">****************************************</span> <i class="privacy-toggle fas fa-eye useCursorPointer"></i>',
|
||||
$data
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!empty($field['onClick'])) {
|
||||
$data = sprintf(
|
||||
|
|
|
@ -84,3 +84,19 @@
|
|||
echo $this->element('/genericElements/IndexTable/pagination', $paginationData);
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.privacy-toggle').on('click', function() {
|
||||
var $privacy_target = $(this).parent().find('.privacy-value');
|
||||
if ($(this).hasClass('fa-eye')) {
|
||||
$privacy_target.text($privacy_target.data('hidden-value'));
|
||||
$(this).removeClass('fa-eye');
|
||||
$(this).addClass('fa-eye-slash');
|
||||
} else {
|
||||
$privacy_target.text('****************************************');
|
||||
$(this).removeClass('fa-eye-slash');
|
||||
$(this).addClass('fa-eye');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -69,7 +69,8 @@
|
|||
'sort' => 'User.authkey',
|
||||
'class' => 'bold quickSelect',
|
||||
'data_path' => 'User.authkey',
|
||||
'onClick' => 'quickSelect(this);'
|
||||
'onClick' => 'quickSelect(this);',
|
||||
'privacy' => 1
|
||||
),
|
||||
array(
|
||||
'name' => __('Autoalert'),
|
||||
|
|
Loading…
Reference in New Issue