diff options
author | Mark Wells <mark@freeside.biz> | 2016-01-12 22:07:17 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-01-12 22:57:44 -0800 |
commit | 779d7540c73ba6ef1be915fe548ccdbc1f739a1d (patch) | |
tree | 6e9dcc52189b52ae29899eb863a160177e5d96ae /httemplate/edit/process/svc_dsl.html | |
parent | 04d3728e07d43ab698f208a061e0ca97b2f73b5e (diff) |
allow svc_acct password field to be disabled, #39528, fixing fallout from #29354 and #32456
Diffstat (limited to 'httemplate/edit/process/svc_dsl.html')
-rw-r--r-- | httemplate/edit/process/svc_dsl.html | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/httemplate/edit/process/svc_dsl.html b/httemplate/edit/process/svc_dsl.html index 889366e07..436ca766b 100644 --- a/httemplate/edit/process/svc_dsl.html +++ b/httemplate/edit/process/svc_dsl.html @@ -12,8 +12,21 @@ my $precheck_callback = sub { my $cgi = shift; my $svcnum = $cgi->param('svcnum'); my $error = ''; + my $old; + my $part_svc; + if ( $svcnum ) { - my $old = FS::svc_dsl->by_key($svcnum); + $old = FS::svc_dsl->by_key($svcnum); + $part_svc = $old->part_svc; + } else { + my $svcpart = $cgi->param('svcpart') or die "svcpart required"; + $part_svc = FS::part_svc->by_key($svcpart); + } + my $psc = $part_svc->part_svc_column('password'); + if ( $psc->columnflag eq 'F' ) { + # enforce it here and skip password validation + $cgi->param('password', $psc->columnvalue; + } else { my $newpass = $cgi->param('password'); if ( $old and $newpass ne $old->password ) { $error ||= $old->is_password_allowed($newpass); |