fixed raspberry authentication for getConfig and removed IP verifiing
This commit is contained in:
@@ -60,10 +60,9 @@ class RaspberryDisplayController extends mfBaseController
|
||||
}
|
||||
|
||||
protected function getConfig() {
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
$hostname = $this->request->hostname;
|
||||
|
||||
$displays = RaspberryDisplayModel::getByHostnameAndIp($hostname, $ip);
|
||||
$displays = RaspberryDisplayModel::getByHostname($hostname);
|
||||
|
||||
if ($displays === null) {
|
||||
die("No display found for this hostname and ip:" . $hostname . " X " . $ip);
|
||||
@@ -82,7 +81,7 @@ class RaspberryDisplayController extends mfBaseController
|
||||
protected function apiAction() {
|
||||
$do = $this->request->do;
|
||||
|
||||
if (!$this->me->is("employee") && !in_array($do, ["getDisplays", "change", "reboot"])) {
|
||||
if ($do !== "getConfig" && !$this->me->is("employee")) {
|
||||
$this->redirect("dashboard");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user