Skip to content
Permalink
Browse files
restrict access if not emoncms_exec
  • Loading branch information
TrystanLea committed Jul 27, 2021
1 parent f9f06f1 commit 58af4fd1212c37f345d33f1e56ad1da8109eb884
Showing with 11 additions and 147 deletions.
  1. +1 −0 Views/dashboard_config.php
  2. +2 −1 Views/dashboard_edit_view.php
  3. +0 −125 Views/dashboard_list.old.php
  4. +4 −0 Views/dashboard_list.php
  5. +0 −19 Views/dashboard_menu.php
  6. +1 −0 Views/dashboard_view.php
  7. +2 −0 Views/loadwidgets.php
  8. +0 −1 dashboard
  9. +1 −1 module.json
@@ -9,6 +9,7 @@
http://openenergymonitor.org
*/
global $path;
defined('EMONCMS_EXEC') or die('Restricted access');
?>

<div id="dashConfigModal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="dashConfigModalLabel" aria-hidden="true" data-backdrop="static">
@@ -9,6 +9,7 @@
http://openenergymonitor.org
*/

defined('EMONCMS_EXEC') or die('Restricted access');
global $session,$path;

load_language_files("Modules/vis/locale", "vis_messages");
@@ -178,4 +179,4 @@ function showSuccess() {
$(window).resize(function(){
designer.draw();
});
</script>
</script>

This file was deleted.

@@ -1,3 +1,7 @@
<?php
defined('EMONCMS_EXEC') or die('Restricted access');
?>

<style>
#app {
max-width: 990px;
@@ -8,22 +8,3 @@
Part of the OpenEnergyMonitor project:
http://openenergymonitor.org
*/

global $path;

$result = "";

/*
if ($type=="view" && isset($id)) {
$result .= "<a class='btn btn-mini' href='" . $path . "dashboard/edit?id=" . $id . "'><span class='icon-edit' title='" . _("Draw Editor") . "'></span></a>";
}
*/

//CHAVEIRO: Removed, dashboard list is accessible via setup menu now
//if ($type!="list") {
// $result .= "<a class='btn btn-mini' href='" . $path . "dashboard/list'><span class='icon-th-list' title='" . _('List view') ."'></span></a>";
//}

if ($result) {
echo "<div class='btn-toolbar' style='padding:2px; margin: 0;' align='right'><div class='btn-group'>".$result."</div></div>";
}
@@ -8,6 +8,7 @@
Part of the OpenEnergyMonitor project:
http://openenergymonitor.org
*/
defined('EMONCMS_EXEC') or die('Restricted access');

global $session,$path,$dashboard_editor_icon,$embed;

@@ -10,6 +10,8 @@
http://openenergymonitor.org
*/

defined('EMONCMS_EXEC') or die('Restricted access');

define("MODULE_PATH","Modules");
echo "<script type='application/javascript'>var requestTime = Date.now() /1000;var offsetofTime = 0;offsetofTime = Math.round(requestTime - ".time()."); // Offset in s from local to server time</script>";

This file was deleted.

@@ -1,6 +1,6 @@
{
"name" : "Dashboard",
"version" : "2.1.3",
"version" : "2.1.4",
"location" : "/var/www/emoncms/Modules",
"branches_available": ["stable","master"]
}

0 comments on commit 58af4fd

Please sign in to comment.