Add 404 error handler and update permission data structure

This commit is contained in:
Kijin Sung 2020-06-18 14:13:23 +09:00
parent e20c06bf00
commit 5fa72f8629
7 changed files with 49 additions and 29 deletions

View file

@ -597,7 +597,7 @@ class ModuleHandler extends Handler
// Protect admin action
if(($this->module == 'admin' || $kind == 'admin') && !ModuleModel::getGrant($forward, $logged_info)->root)
{
if($this->module == 'admin' || empty($xml_info->permission->{$this->act}))
if($this->module == 'admin' || empty($xml_info->action->{$this->act}->permission->target))
{
self::_setInputErrorToContext();
$this->error = 'admin.msg_is_not_administrator';