mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Merge branch 'ent-fix-bulk-alert-operations' into 'develop'
Fixed that restricted users can add/delete all alert templates using bulk alert operations. See merge request artica/pandorafms!4171
This commit is contained in:
commit
77b05de784
@ -261,7 +261,10 @@ $table->data[1][2] .= html_print_select(
|
||||
);
|
||||
$table->data[1][3] = html_print_select([], 'module[]', '', false, '', '', true, true, false, '', false, 'width:180px;');
|
||||
|
||||
$templates = alerts_get_alert_templates(false, ['id', 'name']);
|
||||
$usr_groups = users_get_groups($config['id_user'], 'LW', true);
|
||||
$filter_groups = '';
|
||||
$filter_groups = implode(',', array_keys($usr_groups));
|
||||
$templates = alerts_get_alert_templates(['id_group IN ('.$filter_groups.')'], ['id', 'name']);
|
||||
$table->data[2][0] = __('Alert template');
|
||||
$table->data[2][1] = html_print_select(
|
||||
index_array($templates, 'id', 'name'),
|
||||
|
@ -252,7 +252,10 @@ $table->size[3] = '40%';
|
||||
|
||||
$table->data = [];
|
||||
|
||||
$templates = alerts_get_alert_templates(false, ['id', 'name']);
|
||||
$usr_groups = users_get_groups($config['id_user'], 'LW', true);
|
||||
$filter_groups = '';
|
||||
$filter_groups = implode(',', array_keys($usr_groups));
|
||||
$templates = alerts_get_alert_templates(['id_group IN ('.$filter_groups.')'], ['id', 'name']);
|
||||
$table->data[0][0] = __('Alert template');
|
||||
$table->data[0][1] = html_print_select(
|
||||
index_array($templates, 'id', 'name'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user