You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing a service generated by a Service Apply rules, you should be able to modify the service.
Current Behavior
The following error is generated:
Uncaught TypeError: Icinga\Module\Director\Restriction\ObjectRestriction::__construct(): Argument #2 ($auth) must be of type Icinga\Authentication\Auth, null given, called in /usr/share/icingaweb2/modules.git/director/library/Director/Web/Table/ObjectsTable.php on line 240 and defined in /usr/share/icingaweb2/modules.git/director/library/Director/Restriction/ObjectRestriction.php:22
Stack trace:
#0 /usr/share/icingaweb2/modules.git/director/library/Director/Web/Table/ObjectsTable.php(240): Icinga\Module\Director\Restriction\ObjectRestriction->__construct()
#1 /usr/share/icingaweb2/modules.git/director/library/Director/Web/Table/ObjectsTable.php(227): Icinga\Module\Director\Web\Table\ObjectsTable->loadRestrictions()
#2 /usr/share/icingaweb2/modules.git/director/library/Director/Web/Table/ObjectsTable.php(217): Icinga\Module\Director\Web\Table\ObjectsTable->getRestrictions()
#3 /usr/share/icingaweb2/modules.git/director/library/Director/Web/Table/ObjectsTable.php(340): Icinga\Module\Director\Web\Table\ObjectsTable->applyRestrictions()
#4 /usr/share/icingaweb2/modules.git/director/library/Director/Web/Table/ObjectsTableService.php(189): Icinga\Module\Director\Web\Table\ObjectsTable->prepareQuery()
#5 /usr/share/icingaweb2/modules/incubator/vendor/gipfl/icingaweb2/src/Table/ZfQueryBasedTable.php(124): Icinga\Module\Director\Web\Table\ObjectsTableService->prepareQuery()
#6 /usr/share/icingaweb2/modules/incubator/vendor/gipfl/icingaweb2/src/Table/ZfQueryBasedTable.php(60): gipfl\IcingaWeb2\Table\ZfQueryBasedTable->getQuery()
#7 /usr/share/icingaweb2/modules/incubator/vendor/gipfl/icingaweb2/src/Table/QueryBasedTable.php(66): gipfl\IcingaWeb2\Table\ZfQueryBasedTable->getPaginationAdapter()
#8 [internal function]: gipfl\IcingaWeb2\Table\QueryBasedTable->count()
#9 /usr/share/icingaweb2/modules.git/director/application/controllers/HostController.php(298): count()
#10 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Controllers\HostController->servicesroAction()
#11 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#12 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch()
#13 /usr/share/php/Icinga/Application/Web.php(290): Zend_Controller_Front->dispatch()
#14 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#15 /usr/share/icingaweb2/public/index.php(4): require_once('...')
#16 {main}
thrown
#0 [internal function]: Icinga\Application\Web->Icinga\Application\{closure}()
#1 {main}
Possible Solution
None tested
Steps to Reproduce (for bugs)
Create a service apply rules :
apply Service for (config in host.vars.websites_443) {
name = "Website: check " + config + ":443"
import "template-agent"
import "periode-60min-3x-5min"
import "definition-http"
assign where host.vars.websites_443
groups = [ "websites-443" ]
vars.http_address = "127.0.0.1"
vars.http_hostname = config
vars.http_port = "443"
vars.http_sni = true
vars.http_ssl = true
vars.http_useragent = "custom user agent"
vars.http_vhost = config
import DirectorOverrideTemplate
}
template Service "definition-http" {
import "template-agent"
check_command = "http_"
icon_image = "/icons/Papirus/16x16/actions/web-browser.svg"
icon_image_alt = "http"
groups = [ "websites" ]
}
Your Environment
Director version (System - About): master @ 76509bb
Icinga Web 2 version and modules (System - About):
Icinga Web 2 Version | 2.11.4
Git Commit 11453bfa92a70a44efbf7f966f5e7f27e9300a28
PHP 8.0.30
Git commit date 2023-01-26
Provider: Ubuntu package from packages.icinga.com
Related tables have no Auth objects, that's why they fail. They don't need it right now, but this may change depending on future restriction possibilities. So we should be strict about this, and require an Auth object all the times
Expected Behavior
When editing a service generated by a Service Apply rules, you should be able to modify the service.
Current Behavior
The following error is generated:
Possible Solution
None tested
Steps to Reproduce (for bugs)
Create a service apply rules :
Your Environment
Icinga Web 2 Version | 2.11.4
Git Commit 11453bfa92a70a44efbf7f966f5e7f27e9300a28
PHP 8.0.30
Git commit date 2023-01-26
Provider: Ubuntu package from packages.icinga.com
Loaded Modules
setup : 2.11.4
director : master
icingadb : 1.0.2
incubator : 0.20.0
icinga2 --version
): 2.14.0-1+ubuntu22.04The text was updated successfully, but these errors were encountered: