This commit is contained in:
宋辰轩
2024-04-10 15:15:00 +08:00
parent e377e119d1
commit c575a429d5
4 changed files with 18 additions and 47 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ class entry extends baseEntry
if($this->app->action == 'options') throw EndResponseException::create($this->send(204));
if(!isset($this->app->user) or $this->app->user->account == 'guest') throw EndResponseException::create($this->sendError(401, 'Unauthorized'));
if(!isset($this->app->user->account) or $this->app->user->account == 'guest') throw EndResponseException::create($this->sendError(401, 'Unauthorized'));
$this->dao = $this->loadModel('common')->dao;
}
@@ -708,7 +708,7 @@ class baseEntry
$method = $this->app->getMethodName();
if($module and $method and !$this->loadModel('common')->isOpenMethod($module, $method) and !commonModel::hasPriv($module, $method))
{
return $this->send(403, array('error' => 'Access not allowed'));
die($this->send(403, array('error' => 'Access not allowed')));
}
}