mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
Services: Captive Portal - fix display issue for pass rule when client not in zone
inverse rules unfortunately contain some mappings, which means we need to map them differently for legacy and mvc code.
This commit is contained in:
parent
5ad41a236c
commit
d0f745a70e
@ -352,7 +352,7 @@ class FilterRule extends Rule
|
||||
}
|
||||
public function isUIFromNot()
|
||||
{
|
||||
return isset($this->rule['source']) && isset($this->rule['source']['not']);
|
||||
return (isset($this->rule['source']) && isset($this->rule['source']['not'])) || !empty($this->rule['from_not']);
|
||||
}
|
||||
public function getUIFromPort()
|
||||
{
|
||||
@ -378,7 +378,7 @@ class FilterRule extends Rule
|
||||
}
|
||||
public function isUIToNot()
|
||||
{
|
||||
return isset($this->rule['destination']) && isset($this->rule['destination']['not']);
|
||||
return isset($this->rule['destination']) && isset($this->rule['destination']['not']) || !empty($this->rule['to_not']);
|
||||
}
|
||||
public function getUIToPort()
|
||||
{
|
||||
|
||||
@ -76,6 +76,14 @@ foreach ($fw->iterateFilterRules() as $prio => $item) {
|
||||
}
|
||||
$rule['action'] = $rule['action'] ?? 'pass';
|
||||
$rule['ipprotocol'] = $rule['ipprotocol'] ?? 'inet';
|
||||
if (!empty($rule['from_not'])) {
|
||||
unset($rule['from_not']);
|
||||
$rule['source_not'] = true;
|
||||
}
|
||||
if (!empty($rule['to_not'])) {
|
||||
unset($rule['destination_not']);
|
||||
$rule['destination_not'] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluation order consists of a priority group and a sequence within the set,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user