whitelist for submodules
This commit is contained in:
parent
e558d712cd
commit
a1613d9291
1 changed files with 16 additions and 15 deletions
|
|
@ -166,9 +166,11 @@ class Filter_Login extends Filter_Filter
|
|||
$module = $request->get('module');
|
||||
$action = $request->get('action');
|
||||
|
||||
$file = Path::join(CMS_PATH, 'modules', $module, 'filters', 'white.json');
|
||||
$moduleDir = explode('_',$module)[0];
|
||||
$file = Path::join(CMS_PATH, 'modules', $moduleDir, 'filters', 'white.json');
|
||||
if (file_exists($file)) {
|
||||
$whiteList = json_decode(file_get_contents($file), true);
|
||||
|
||||
if (in_array($action, $whiteList)) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -177,4 +179,3 @@ class Filter_Login extends Filter_Filter
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue