Merge branch '1576-Permisos-sobre-gráficas-no-permite-ver-graph-containers-4863-media-open' into 'develop'
1576 permisos sobre gráficas no permite ver graph containers 4863 media open See merge request artica/pandorafms!1072
This commit is contained in:
commit
4f0a451ba1
|
@ -18,12 +18,18 @@ global $config;
|
|||
// Check user credentials
|
||||
check_login ();
|
||||
|
||||
if (! check_acl ($config['id_user'], 0, "RW")) {
|
||||
if (! check_acl ($config['id_user'], 0, "RR")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access Inventory Module Management");
|
||||
require ("general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
$report_r = check_acl ($config['id_user'], 0, "RR");
|
||||
$report_w = check_acl ($config['id_user'], 0, "RW");
|
||||
$report_m = check_acl ($config['id_user'], 0, "RM");
|
||||
$access = ($report_r == true) ? 'RR' : (($report_w == true) ? 'RW' : (($report_m == true) ? 'RM' : 'RR'));
|
||||
|
||||
require_once ('include/functions_container.php');
|
||||
|
||||
$delete_container = get_parameter('delete_container',0);
|
||||
|
@ -72,13 +78,13 @@ $container = folder_get_folders();
|
|||
|
||||
$tree = folder_get_folders_tree_recursive($container);
|
||||
echo folder_togge_tree_folders($tree);
|
||||
|
||||
echo "<div style='float: right;'>";
|
||||
echo '<form method="post" style="float:right;" action="index.php?sec=reporting&sec2=godmode/reporting/create_container">';
|
||||
html_print_submit_button (__('Create container'), 'create', false, 'class="sub next" style="margin-right:5px;margin-top: 15px;"');
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
if($report_r && $report_w){
|
||||
echo "<div style='float: right;'>";
|
||||
echo '<form method="post" style="float:right;" action="index.php?sec=reporting&sec2=godmode/reporting/create_container">';
|
||||
html_print_submit_button (__('Create container'), 'create', false, 'class="sub next" style="margin-right:5px;margin-top: 15px;"');
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -208,7 +208,14 @@ function folder_get_sibling($sibling) {
|
|||
}
|
||||
|
||||
function ui_toggle_container($code, $name, $title = '', $hidden_default = true, $return = false, $group , $id_container, $parent = false) {
|
||||
// Generate unique Id
|
||||
|
||||
global $config;
|
||||
$report_r = check_acl ($config['id_user'], 0, "RR");
|
||||
$report_w = check_acl ($config['id_user'], 0, "RW");
|
||||
$report_m = check_acl ($config['id_user'], 0, "RM");
|
||||
$access = ($report_r == true) ? 'RR' : (($report_w == true) ? 'RW' : (($report_m == true) ? 'RM' : 'RR'));
|
||||
|
||||
// Generate unique Id
|
||||
$uniqid = uniqid('');
|
||||
|
||||
// Options
|
||||
|
@ -277,12 +284,16 @@ function ui_toggle_container($code, $name, $title = '', $hidden_default = true,
|
|||
$data = array();
|
||||
$data[0] = '<a href="javascript:" id="tgl_ctrl_'.$uniqid.'">' . html_print_image ($original, true, array ("title" => $title, "id" => "image_".$uniqid)) . ' <b>'.$name.'</b></a>';
|
||||
$data[1] = ui_print_group_icon($group,true);
|
||||
if($report_r && $report_w){
|
||||
$data[2] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/create_container&edit_container=1&id='.
|
||||
$id_container .'">'.html_print_image("images/config.png", true).'</a>';
|
||||
if ($id_container !== '1'){
|
||||
$data[2] .= '  ' .'<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container&delete_container=1&id='
|
||||
.$id_container.'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
|
||||
return false;">' . html_print_image("images/cross.png", true, array('alt' => __('Delete'), 'title' => __('Delete'))) . '</a>';
|
||||
}
|
||||
if($report_r && $report_w && $report_m){
|
||||
if ($id_container !== '1'){
|
||||
$data[2] .= '  ' .'<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_container&delete_container=1&id='
|
||||
.$id_container.'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
|
||||
return false;">' . html_print_image("images/cross.png", true, array('alt' => __('Delete'), 'title' => __('Delete'))) . '</a>';
|
||||
}
|
||||
}
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
|
|
@ -500,7 +500,16 @@ function menu_add_extras(&$menu) {
|
|||
$menu_extra['eventos']['sub']['godmode/events/events']['text'] = __('Administration events');
|
||||
|
||||
$menu_extra['reporting']['sub']['operation/reporting/reporting_viewer']['text'] = __('View reporting');
|
||||
|
||||
$menu_extra['reporting']['sub']['godmode/reporting/graph_builder']['text'] = __('Manage custom graphs');
|
||||
$menu_extra['reporting']['sub']['godmode/reporting/graph_container']['text'] = __('View graph containers');
|
||||
$menu_extra['reporting']['sub']['godmode/reporting/create_container']['text'] = __('Manage graph containers');
|
||||
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_list']['text'] = __('View graph templates');
|
||||
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_editor']['text'] = __('Manage graph templates');
|
||||
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_item_editor']['text'] = __('Graph template items');
|
||||
$menu_extra['reporting']['sub']['enterprise/godmode/reporting/graph_template_wizard']['text'] = __('Graph template wizard');
|
||||
|
||||
|
||||
$menu_extra['reporting']['sub']['enterprise/dashboard/dashboard_replicate']['text'] = __('Copy dashboard');
|
||||
|
||||
if ($config['activate_gis'])
|
||||
|
|
Loading…
Reference in New Issue