private function checkRouteAccess($route, $permissions)
    {
        $permission_level = 0;
        
        if (array_key_exists($route, $permissions)) {
            $permission_level = $permissions->$route;
            
            // Check if type is bool, convert to int
            if (gettype($permission_level) == 'boolean') {
                $permission_level = ($permission_level ? 1 : 0);
            }
        }
        
        return $permission_level;
    }
private function checkRouteAccess($route, $permissions)
    {
        $permission_level = 0;
        
        if (array_key_exists($route, $permissions)) {
            $permission_level = $permissions->$route;
            
            // Check if type is bool, convert to int
            if (gettype($permission_level) == 'boolean') {
                $permission_level = ($permission_level ? 1 : 0);
            }
        }
        
        return $permission_level;
    }
private function checkRouteAccess ( $ route , $ permissions ) { $ permission_level = 0 ; if ( array_key_exists ( $ route , $ permissions ) ) { $ permission_level = $ permissions -> $ route ; // Check if type is bool, convert to int if ( gettype ( $ permission_level ) == 'boolean' ) { $ permission_level = ( $ permission_level ? 1 : 0 ) ; } } return $ permission_level ; }
Check this route for permission

@param string path
@param object Permissions
@return bool True if user has access rights
Check this route for permission