1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-19 21:02:09 +02:00

check_class() code optimization

This commit is contained in:
Cameron
2020-12-10 18:02:28 -08:00
parent f605ddc552
commit 4a30f88f2c
3 changed files with 55 additions and 41 deletions

View File

@@ -1152,11 +1152,13 @@ class e_admin_dispatcher
{
if(isset($this->access[$route]) && !e107::getUser()->checkClass($this->access[$route], false))
{
e107::getMessage()->addDebug("Userclass Permissions Failed: ".$this->access[$route]);
return false;
}
if(is_array($this->perm) && isset($this->perm[$route]) && !e107::getUser()->checkAdminPerms($this->perm[$route]))
{
e107::getMessage()->addDebug("Admin Permissions Failed.".$this->perm[$route]);
return false;
}