Skip to content

Commit

Permalink
RedundancygroupController: Restrict customVar suggestions
Browse files Browse the repository at this point in the history
- Only use fetchable relations.
- Restrict to `host`, `service`, `hostgroup` and `servicegroup`
  • Loading branch information
sukhwinder33445 committed Nov 26, 2024
1 parent d2b4643 commit 54392b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions application/controllers/RedundancygroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public function completeAction(): void
$suggestions = (new ObjectSuggestions())
->setModel(DependencyNode::class)
->setBaseFilter(Filter::equal("$column.redundancy_group.id", $this->groupId))
->onlyWithCustomVarSources(['host', 'service', 'hostgroup', 'servicegroup'])
->forRequest($this->getServerRequest());

$this->getDocument()->add($suggestions);
Expand Down

0 comments on commit 54392b3

Please sign in to comment.