Added ACL in integria tabs
This commit is contained in:
parent
8d2820df37
commit
3bfa7fb596
|
@ -34,6 +34,8 @@ require_once $config['homedir'].'/include/functions.php';
|
||||||
*/
|
*/
|
||||||
function integriaims_tabs($active_tab, $view=false)
|
function integriaims_tabs($active_tab, $view=false)
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
$url_tabs = ui_get_full_url('index.php?sec=incident&sec2=operation/incidents/');
|
$url_tabs = ui_get_full_url('index.php?sec=incident&sec2=operation/incidents/');
|
||||||
|
|
||||||
$setup_tab['text'] = '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=integria').'">'.html_print_image('images/setup.png', true, ['title' => __('Configure Integria IMS')]).'</a>';
|
$setup_tab['text'] = '<a href="'.ui_get_full_url('index.php?sec=general&sec2=godmode/setup/setup§ion=integria').'">'.html_print_image('images/setup.png', true, ['title' => __('Configure Integria IMS')]).'</a>';
|
||||||
|
@ -75,12 +77,23 @@ function integriaims_tabs($active_tab, $view=false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$onheader = [
|
$onheader = [];
|
||||||
'view' => $view_tab,
|
|
||||||
'configure' => $setup_tab,
|
if (check_acl($config['id_user'], 0, 'IR') && $view) {
|
||||||
'list' => $list_tab,
|
$onheader['view'] = $view_tab;
|
||||||
'create' => $create_tab,
|
}
|
||||||
];
|
|
||||||
|
if (check_acl($config['id_user'], 0, 'PM') && is_user_admin($config['id_user'])) {
|
||||||
|
$onheader['configure'] = $setup_tab;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (check_acl($config['id_user'], 0, 'IR')) {
|
||||||
|
$onheader['list'] = $list_tab;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((check_acl($config['id_user'], 0, 'IW') && check_acl($config['id_user'], 0, 'IR'))) {
|
||||||
|
$onheader['create'] = $create_tab;
|
||||||
|
}
|
||||||
|
|
||||||
return $onheader;
|
return $onheader;
|
||||||
}
|
}
|
||||||
|
@ -221,7 +234,7 @@ function get_array_from_csv_data_pair($csv_data, &$array_values)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse CSV consisting of one or more lines of the form key-value pair into an array.
|
* Parse CSV consisting of all lines into an array.
|
||||||
*
|
*
|
||||||
* @param string $csv_data Data returned of csv api call.
|
* @param string $csv_data Data returned of csv api call.
|
||||||
* @param string $array_values Returned array.
|
* @param string $array_values Returned array.
|
||||||
|
|
Loading…
Reference in New Issue