Настройка доступных методов в json

This commit is contained in:
Podlesnov Phedor 2021-07-15 16:41:07 +03:00
parent dfb800682b
commit 2174a497b5

View file

@ -166,9 +166,9 @@ class Filter_Login extends Filter_Filter
$module = $request->get('module');
$action = $request->get('action');
$file = Path::join(CMS_PATH, 'modules', $module, 'filters', 'white.php');
$file = Path::join(CMS_PATH, 'modules', $module, 'filters', 'white.json');
if (file_exists($file)) {
$whiteList = include $file;
$whiteList = json_decode(file_get_contents($file), true);
if (in_array($action, $whiteList)) {
return true;
}