mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-13853-error-en-el-public-link-al-estar-logueado-con-usuario-sin-permisos-dashboards' into 'develop'
Ent 13853 error en el public link al estar logueado con usuario sin permisos dashboards See merge request artica/pandorafms!7438
This commit is contained in:
commit
0756f6dc09
@ -940,7 +940,7 @@ $buttons['consoles_list'] = [
|
||||
$buttons['public_link'] = [
|
||||
'active' => false,
|
||||
'text' => '<a href="'.ui_get_full_url(
|
||||
'operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&id_layout='.$idVisualConsole.'&id_user='.$config['id_user'],
|
||||
'operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&id_layout='.$idVisualConsole.'&creator_user='.$config['id_user'],
|
||||
false,
|
||||
false,
|
||||
false
|
||||
|
@ -356,7 +356,7 @@ class Manager implements PublicLogin
|
||||
{
|
||||
global $config;
|
||||
|
||||
$str = $config['dbpass'];
|
||||
$str = $config['server_unique_identifier'];
|
||||
$str .= $config['id_user'];
|
||||
$str .= $other_secret;
|
||||
return hash('sha256', $str);
|
||||
@ -399,11 +399,6 @@ class Manager implements PublicLogin
|
||||
):bool {
|
||||
global $config;
|
||||
|
||||
if (isset($config['id_user']) === true) {
|
||||
// Already logged in.
|
||||
return true;
|
||||
}
|
||||
|
||||
$userFromParams = false;
|
||||
// Try to get id_user from parameters if it is missing.
|
||||
if (isset($config['id_user']) === false) {
|
||||
|
@ -229,7 +229,7 @@ class User extends Entity implements PublicLogin
|
||||
{
|
||||
global $config;
|
||||
|
||||
$str = $config['dbpass'];
|
||||
$str = $config['server_unique_identifier'];
|
||||
$str .= ($config['id_user'] ?? get_parameter('id_user'));
|
||||
$str .= $other_secret;
|
||||
return hash('sha256', $str);
|
||||
|
@ -44,7 +44,7 @@ if ($dashboardId !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$config['id_user'] = get_parameter('creator_user');
|
||||
require_once 'dashboard.php';
|
||||
|
||||
// Clean session to avoid direct access.
|
||||
|
@ -38,7 +38,7 @@ $config['remote_addr'] = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
$hash = get_parameter('hash');
|
||||
$idMap = (int) get_parameter('map_id');
|
||||
$config['id_user'] = get_parameter('id_user');
|
||||
$config['id_user'] = get_parameter('creator_user');
|
||||
|
||||
$myhash = md5($config['dbpass'].$idMap.$config['id_user']);
|
||||
|
||||
|
@ -142,7 +142,7 @@ if ($config['pure'] == 0) {
|
||||
if ($has_management_acl === true) {
|
||||
$hash = md5($config['dbpass'].$idMap.$config['id_user']);
|
||||
$buttons['public_link']['text'] = '<a href="'.ui_get_full_url(
|
||||
'operation/gis_maps/public_console.php?hash='.$hash.'&map_id='.$idMap.'&id_user='.$config['id_user']
|
||||
'operation/gis_maps/public_console.php?hash='.$hash.'&map_id='.$idMap.'&creator_user='.$config['id_user']
|
||||
).'" target="_blank">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public GIS map'), 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ if ($aclWrite === true || $aclManage === true) {
|
||||
$hash = User::generatePublicHash($visualConsoleId);
|
||||
|
||||
$options['public_link']['text'] = '<a href="'.ui_get_full_url(
|
||||
'operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&id_user='.$config['id_user'],
|
||||
'operation/visual_console/public_console.php?hash='.$hash.'&refr='.$refr.'&creator_user='.$config['id_user'],
|
||||
false,
|
||||
false,
|
||||
false
|
||||
|
@ -135,9 +135,9 @@ $slides['text'] .= '</a>';
|
||||
|
||||
// Public Url.
|
||||
$queryPublic = [
|
||||
'hash' => $hash,
|
||||
'id_user' => $config['id_user'],
|
||||
'pure' => 1,
|
||||
'hash' => $hash,
|
||||
'creator_user' => $config['id_user'],
|
||||
'pure' => 1,
|
||||
];
|
||||
$publicUrl = ui_get_full_url(
|
||||
'operation/dashboard/public_dashboard.php?'.http_build_query($queryPublic)
|
||||
|
Loading…
x
Reference in New Issue
Block a user