Merge branch 'ent-12964-no-permitir-iniciar-sesion-de-superadmin-con-un-enlace-a-un-dashboard-publico' into 'develop'

Ent 12964 No permitir iniciar sesión  de superadmin con un enlace a un Dashboard público

See merge request artica/pandorafms!7000
This commit is contained in:
Rafael Ameijeiras 2024-03-12 08:56:31 +00:00
commit 499e74a964
4 changed files with 9 additions and 3 deletions

View File

@ -1270,6 +1270,7 @@ class Heatmap
*/ */
public function showHeatmap() public function showHeatmap()
{ {
global $config;
$result = $this->getData(); $result = $this->getData();
if (empty($result) === true) { if (empty($result) === true) {
@ -1371,6 +1372,8 @@ class Heatmap
type: type, type: type,
id: id, id: id,
id_server: server, id_server: server,
auth_hash: '<?php echo $this->hash; ?>',
id_user: '<?php echo $config['id_user']; ?>'
}, },
dataType: 'html', dataType: 'html',
success: function(data) { success: function(data) {

View File

@ -13722,7 +13722,7 @@ button.disabled {
border: 0px; border: 0px;
} }
.ui-draggable-handle { #graph_analytics .ui-draggable-handle {
z-index: 2 !important; z-index: 2 !important;
} }

View File

@ -51,6 +51,8 @@ $height = get_parameter('height', 0);
$width = get_parameter('width', 0); $width = get_parameter('width', 0);
$search = get_parameter('search', ''); $search = get_parameter('search', '');
$filter = get_parameter('filter', []); $filter = get_parameter('filter', []);
$hash = get_parameter('auth_hash', '');
if (is_array($filter) === false) { if (is_array($filter) === false) {
$filter = explode(',', $filter); $filter = explode(',', $filter);
} }
@ -233,7 +235,7 @@ if ($is_ajax === false && $pure === true) {
// Control call flow. // Control call flow.
try { try {
// Heatmap construct. // Heatmap construct.
$heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group, $dashboard); $heatmap = new Heatmap($type, $filter, $randomId, $refresh, $width, $height, $search, $group, $dashboard, $hash);
} catch (Exception $e) { } catch (Exception $e) {
if (is_ajax() === true) { if (is_ajax() === true) {
echo json_encode(['error' => '[Heatmap]'.$e->getMessage() ]); echo json_encode(['error' => '[Heatmap]'.$e->getMessage() ]);
@ -261,7 +263,7 @@ if ($is_ajax === true) {
} }
// Stop any execution. // Stop any execution.
exit; return;
} else { } else {
// Run. // Run.
$heatmap->run(); $heatmap->run();

View File

@ -954,6 +954,7 @@ $filters_div = html_print_div(
$graphs_div = html_print_div( $graphs_div = html_print_div(
[ [
'id' => 'graph_analytics',
'class' => 'padding-div graphs-div-main', 'class' => 'padding-div graphs-div-main',
'content' => $right_content, 'content' => $right_content,
], ],