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:07:17 -0800 |
commit | 8c4fb61d3ab13ca97f9fe037555087506435d9da (patch) | |
tree | 29ba945c9bd20cd53c4f1c8b16a550dbaaebfad5 /httemplate/edit/process/svc_dsl.html | |
parent | 992573160bf2fc89b1d957973109e03d2abf0a47 (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); |