[freeside-commits]
freeside/FS/FS/part_export shellcommands.pm, 1.37, 1.38
Ivan,,,
ivan at wavetail.420.am
Mon Nov 21 06:25:14 PST 2005
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail:/tmp/cvs-serv4674
Modified Files:
shellcommands.pm
Log Message:
add usermod_nousername flag to just prohibit username changes
Index: shellcommands.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/shellcommands.pm,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- shellcommands.pm 17 Nov 2005 15:56:18 -0000 1.37
+++ shellcommands.pm 21 Nov 2005 14:25:12 -0000 1.38
@@ -41,6 +41,9 @@
'usermod_pwonly' => { label=>'Disallow username, domain, uid, gid, dir and RADIUS group changes',
type =>'checkbox',
},
+ 'usermod_nousername' => { label=>'Disallow just username changes',
+ type =>'checkbox',
+ },
'suspend' => { label=>'Suspension command',
default=>'usermod -L $username',
},
@@ -270,11 +273,13 @@
@old_radius_groups = $old->radius_groups;
@new_radius_groups = $new->radius_groups;
- if ( $self->option('usermod_pwonly') ) {
- my $error = '';
+ my $error = '';
+ if ( $self->option('usermod_pwonly') || $self->option('usermod_nousername') ){
if ( $old_username ne $new_username ) {
$error ||= "can't change username";
}
+ }
+ if ( $self->option('usermod_pwonly') ) {
if ( $old_domain ne $new_domain ) {
$error ||= "can't change domain";
}
@@ -291,9 +296,10 @@
join("\n", sort @new_radius_groups) ) {
$error ||= "can't change RADIUS groups";
}
- return $error. ' ('. $self->exporttype. ' to '. $self->machine. ')'
- if $error;
}
+ return $error. ' ('. $self->exporttype. ' to '. $self->machine. ')'
+ if $error;
+
$self->shellcommands_queue( $new->svcnum,
user => $self->option('user')||'root',
host => $self->machine,
More information about the freeside-commits
mailing list