From db0f84f0ddf82ea1786228cfeddd96d6f759da43 Mon Sep 17 00:00:00 2001 From: daitingting Date: Mon, 14 Aug 2023 09:19:11 +0000 Subject: [PATCH] * If the user is logon, limit vision. --- framework/router.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/router.class.php b/framework/router.class.php index 41f2eaa016..697d2df5d6 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -506,7 +506,10 @@ class router extends baseRouter } else { - $action = $this->dbh->query("SELECT * FROM " . TABLE_WORKFLOWACTION . " WHERE `module` = '$this->moduleName' AND `action` = '$this->methodName' AND `vision` = '{$this->config->vision}'")->fetch(); + $actionQuery = "SELECT * FROM " . TABLE_WORKFLOWACTION . " WHERE `module` = '$this->moduleName' AND `action` = '$this->methodName'"; + if(isset($this->app->user) && $this->app->user->account != 'guest') $actionQuery .= " AND `vision` = '{$this->config->vision}'"; + + $action = $this->dbh->query($actionQuery)->fetch(); if(zget($action, 'extensionType') == 'override') { $this->rawModule = $this->moduleName;