Created
January 4, 2024 02:53
-
-
Save ftoledo/b8637ef805599d30852a4f268bc7b542 to your computer and use it in GitHub Desktop.
parche para plugin de metabase de glpi por cambio de api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
versiones probadas | |
glpi: 10.0.10 / 10.0.11 | |
plugin metabase: 1.3.3 | |
metabase (version jar): 0.48.1 | |
diff -up inc.orig/apiclient.class.php inc/apiclient.class.php | |
--- inc.orig/apiclient.class.php 2023-08-10 08:05:07.572319087 -0300 | |
+++ inc/apiclient.class.php 2024-01-03 23:37:03.468753862 -0300 | |
@@ -482,7 +482,7 @@ class PluginMetabaseAPIClient extends Co | |
return false; | |
} | |
- $data = $this->httpQuery('dashboard'); | |
+ $data = $this->httpQuery('dashboard/embeddable'); | |
return $data; | |
} | |
diff -up inc.orig/dashboard.class.php inc/dashboard.class.php | |
--- inc.orig/dashboard.class.php 2023-08-10 08:05:07.572319087 -0300 | |
+++ inc/dashboard.class.php 2024-01-03 23:34:05.455303835 -0300 | |
@@ -99,13 +99,12 @@ class PluginMetabaseDashboard extends Co | |
$dashboards = array_filter( | |
$dashboards, | |
function ($dashboard) { | |
- $isEmbeddingEnabled = $dashboard['enable_embedding']; | |
$canView = PluginMetabaseProfileright::canProfileViewDashboard( | |
$_SESSION['glpiactiveprofile']['id'], | |
$dashboard['id'] | |
); | |
- return $isEmbeddingEnabled && $canView; | |
+ return $canView; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment