fixed permissions on response

This commit is contained in:
Daniel Maya 2021-03-11 16:11:06 +01:00
parent 16ee65ba95
commit 2f7d0f1795
3 changed files with 55 additions and 16 deletions

View File

@ -1381,6 +1381,12 @@ if ($get_extended_event) {
'EW',
$event['clean_tags'],
$childrens_ids
)) || (tags_checks_event_acl(
$config['id_user'],
$event['id_grupo'],
'ER',
$event['clean_tags'],
$childrens_ids
)))
) {
$tabs .= "<li><a href='#extended_event_responses_page' id='link_responses'>".html_print_image(
@ -1444,6 +1450,12 @@ if ($get_extended_event) {
'EW',
$event['clean_tags'],
$childrens_ids
)) || (tags_checks_event_acl(
$config['id_user'],
$event['id_grupo'],
'ER',
$event['clean_tags'],
$childrens_ids
)))
) {
$responses = events_page_responses($event);

View File

@ -3591,6 +3591,20 @@ function events_page_responses($event, $childrens_ids=[])
);
}
if ((tags_checks_event_acl(
$config['id_user'],
$event['id_grupo'],
'EM',
$event['clean_tags'],
$childrens_ids
)) || (tags_checks_event_acl(
$config['id_user'],
$event['id_grupo'],
'EW',
$event['clean_tags'],
$childrens_ids
))
) {
$table_responses->data[] = $data;
// Comments.
@ -3607,6 +3621,7 @@ function events_page_responses($event, $childrens_ids=[])
);
$table_responses->data[] = $data;
}
if (tags_checks_event_acl(
$config['id_user'],

View File

@ -1603,8 +1603,20 @@ try {
}
// Event responses.
if (is_user_admin($config['id_user'])) {
$sql_event_resp = "SELECT id, name FROM tevent_response WHERE type LIKE 'command'";
$event_responses = db_get_all_rows_sql($sql_event_resp);
} else {
$id_groups = array_keys(users_get_groups(false, 'EW'));
$event_responses = db_get_all_rows_filter(
'tevent_response',
[
'id_group' => $id_groups,
'type' => 'command',
]
);
}
if ($config['event_replication'] != 1) {
if ($event_w && !$readonly) {