Skip to content

Commit

Permalink
Merge pull request #7605 from inverse-inc/fix/7604
Browse files Browse the repository at this point in the history
Skip switch type PacketFence
  • Loading branch information
fdurand authored Mar 22, 2023
2 parents 42d0607 + 517f62e commit 9eb449a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion html/pfappserver/lib/pfappserver/Form/Config/Roles.pm
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ sub validate {
$acls = [split(/\n/, $acls)];
while (my ($switch_id, $data) = each %pf::SwitchFactory::SwitchConfig) {
my $type = $data->{type};
next if !defined $type || $type eq '';
next if !defined $type || $type eq '' || $type eq 'PacketFence';
my $module = pf::SwitchFactory::getModule($type);
next if !defined $module;
my $switch = $module->new({ id => $switch_id, %$data});
Expand Down
4 changes: 4 additions & 0 deletions lib/pf/Switch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3966,6 +3966,10 @@ sub ACLsLimit {

sub checkRoleACLs {
my ($self, $name, $acls) = @_;
if (($self->{_type} // '') eq 'PacketFence') {
return undef;
}

my $count = @{$acls // []};

if ($count == 0) {
Expand Down

0 comments on commit 9eb449a

Please sign in to comment.