sub validateTypedRow { my ($self, $action, $changedFields) = @_; my @portsToCheck = (); if ( exists $changedFields->{radiusauthport} and $action eq 'update') { push(@portsToCheck, $changedFields->{radiusauthport}->value()); } if ( exists $changedFields->{radiusacctport} and $action eq 'update') { push(@portsToCheck, $changedFields->{radiusacctport}->value()); } my $gl = EBox::Global->getInstance(); my $firewall = $gl->modInstance('firewall'); foreach my $portNumber (@portsToCheck) { unless ( $firewall->availablePort('tcp', $portNumber) ) { throw EBox::Exceptions::DataExists( 'data' => __('listening port'), 'value' => $portNumber, ); } } } my @tableHeader = ( new EBox::Types::Port( fieldName => 'radiusauthport', printableName => __('RADIUS Auth port'), editable => 1, defaultValue => 1812, ), new EBox::Types::Port( fieldName => 'radiusacctport', printableName => __('RADIUS Accounting port'), editable => 1, defaultValue => 1813, ), # new EBox::Types::Boolean( # fieldName => 'enableDir', # printableName => __x('Enable per user {dirName}', # dirName => PUBLIC_DIR), # editable => 1, # defaultValue => EBox::WebServer::Model::GeneralSettings::DefaultEnableDir(), # ), );