1 <% include( 'elements/svc_Common.html',
3 'precheck_callback' => $precheck_callback,
9 unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
11 my $precheck_callback = sub {
13 my $svcnum = $cgi->param('svcnum');
19 $old = FS::svc_dsl->by_key($svcnum);
20 $part_svc = $old->part_svc;
22 my $svcpart = $cgi->param('svcpart') or die "svcpart required";
23 $part_svc = FS::part_svc->by_key($svcpart);
25 my $psc = $part_svc->part_svc_column('password');
26 if ( $psc->columnflag eq 'F' ) {
27 # enforce it here and skip password validation
28 $cgi->param('password', $psc->columnvalue;
30 my $newpass = $cgi->param('password');
31 if ( $old and $newpass ne $old->password ) {
32 $error ||= $old->is_password_allowed($newpass);