projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f67f6e8
)
RADIUS groups for svc_broadband, #14695
author
mark
<mark>
Fri, 11 Nov 2011 02:00:00 +0000
(
02:00
+0000)
committer
mark
<mark>
Fri, 11 Nov 2011 02:00:00 +0000
(
02:00
+0000)
FS/FS/part_export/sqlradius.pm
patch
|
blob
|
history
httemplate/edit/part_svc.cgi
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/sqlradius.pm
b/FS/FS/part_export/sqlradius.pm
index
07f6cf0
..
736b34e
100644
(file)
--- a/
FS/FS/part_export/sqlradius.pm
+++ b/
FS/FS/part_export/sqlradius.pm
@@
-12,7
+12,7
@@
use Carp qw( cluck );
@ISA = qw(FS::part_export);
@EXPORT_OK = qw( sqlradius_connect );
@ISA = qw(FS::part_export);
@EXPORT_OK = qw( sqlradius_connect );
-$DEBUG =
0
;
+$DEBUG =
1
;
my %groups;
tie %options, 'Tie::IxHash',
my %groups;
tie %options, 'Tie::IxHash',
@@
-119,18
+119,28
@@
sub _groups_susp_reason_map { map { reverse( /^\s*(\S+)\s*(.*)$/ ) }
sub rebless { shift; }
sub rebless { shift; }
-sub export_username {
+sub export_username {
# override for other svcdb
my($self, $svc_acct) = (shift, shift);
warn "export_username called on $self with arg $svc_acct" if $DEBUG > 1;
$svc_acct->username;
}
my($self, $svc_acct) = (shift, shift);
warn "export_username called on $self with arg $svc_acct" if $DEBUG > 1;
$svc_acct->username;
}
+sub radius_reply { #override for other svcdb
+ my($self, $svc_acct) = (shift, shift);
+ $svc_acct->radius_reply;
+}
+
+sub radius_check { #override for other svcdb
+ my($self, $svc_acct) = (shift, shift);
+ $svc_acct->radius_check;
+}
+
sub _export_insert {
my($self, $svc_x) = (shift, shift);
foreach my $table (qw(reply check)) {
my $method = "radius_$table";
sub _export_insert {
my($self, $svc_x) = (shift, shift);
foreach my $table (qw(reply check)) {
my $method = "radius_$table";
- my %attrib = $s
vc_x->$method(
);
+ my %attrib = $s
elf->$method($svc_x
);
next unless keys %attrib;
my $err_or_queue = $self->sqlradius_queue( $svc_x->svcnum, 'insert',
$table, $self->export_username($svc_x), %attrib );
next unless keys %attrib;
my $err_or_queue = $self->sqlradius_queue( $svc_x->svcnum, 'insert',
$table, $self->export_username($svc_x), %attrib );
diff --git
a/httemplate/edit/part_svc.cgi
b/httemplate/edit/part_svc.cgi
index
964e088
..
10b4c77
100755
(executable)
--- a/
httemplate/edit/part_svc.cgi
+++ b/
httemplate/edit/part_svc.cgi
@@
-126,7
+126,11
@@
Service <INPUT TYPE="text" NAME="svc" VALUE="<% $hashref->{svc} %>"><BR>
% )
% } fields($layer);
% }
% )
% } fields($layer);
% }
-% push @fields, 'usergroup' if $layer eq 'svc_acct'; #kludge
+% push @fields, 'usergroup'
+% if $layer eq 'svc_acct'
+% or ( $layer eq 'svc_broadband' and
+% $conf->exists('svc_broadband-radius') ); # double kludge
+% # (but we do want to check the config, right?)
% $part_svc->svcpart($clone) if $clone; #haha, undone below
%
%
% $part_svc->svcpart($clone) if $clone; #haha, undone below
%
%
@@
-307,7
+311,9
@@
Service <INPUT TYPE="text" NAME="svc" VALUE="<% $hashref->{svc} %>"><BR>
% 'curr_value' => $value,
% 'element_name' => "${layer}__${field}",
% 'element_etc' => $disabled,
% 'curr_value' => $value,
% 'element_name' => "${layer}__${field}",
% 'element_etc' => $disabled,
-% 'multiple' => ($flag eq 'S'),
+% 'multiple' => ($def->{multiple} ||
+% $flag eq 'S'),
+% # allow the table def to force 'multiple'
% );
%
% } elsif ( $def->{type} eq 'communigate_pro-accessmodes' ) {
% );
%
% } elsif ( $def->{type} eq 'communigate_pro-accessmodes' ) {
@@
-387,6
+393,7
@@
Table <% $widget->html %>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my $conf = FS::Conf->new;
my $part_svc;
my $clone = '';
if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {#clone
my $part_svc;
my $clone = '';
if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {#clone