From: Marcin Haba Date: Mon, 28 Apr 2014 02:18:23 +0000 (+0200) Subject: Clear bvfs cache and set debug options available only for admin X-Git-Tag: Release-7.0.3~17 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5efdec617cd1d15662bb8e8de4ae57d262603b4d;p=bacula%2Fbacula Clear bvfs cache and set debug options available only for admin --- diff --git a/gui/baculum/protected/Pages/Home.php b/gui/baculum/protected/Pages/Home.php index 854fd7b357..c8fd3a0fdc 100644 --- a/gui/baculum/protected/Pages/Home.php +++ b/gui/baculum/protected/Pages/Home.php @@ -35,6 +35,8 @@ class Home extends BaculumPage $this->SettingsWizardBtn->Visible = $this->User->getIsAdmin(); $this->MediaBtn->Visible = $this->User->getIsAdmin(); + $this->ClearBvfsCache->Visible = $this->User->getIsAdmin(); + $this->Logging->Visible = $this->User->getIsAdmin(); if(!$this->IsPostBack && !$this->IsCallBack) { $this->Logging->Checked = $this->getModule('logging')->isDebugOn(); @@ -65,11 +67,15 @@ class Home extends BaculumPage } public function setDebug($sender, $param) { - $this->getModule('logging')->enableDebug($this->Logging->Checked); + if($this->User->getIsAdmin() === true) { + $this->getModule('logging')->enableDebug($this->Logging->Checked); + } } public function clearBvfsCache($sender, $param) { - $this->getModule('api')->set(array('bvfs', 'clear'), array()); + if($this->User->getIsAdmin() === true) { + $this->getModule('api')->set(array('bvfs', 'clear'), array()); + } } } ?> \ No newline at end of file