projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prohibit self-service changing of suspended packages, RT#26140
[freeside.git]
/
FS
/
FS
/
ClientAPI
/
MyAccount.pm
diff --git
a/FS/FS/ClientAPI/MyAccount.pm
b/FS/FS/ClientAPI/MyAccount.pm
index
2aeecc1
..
241963f
100644
(file)
--- a/
FS/FS/ClientAPI/MyAccount.pm
+++ b/
FS/FS/ClientAPI/MyAccount.pm
@@
-2303,6
+2303,11
@@
sub change_pkg {
my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $p->{pkgnum} } )
or return { 'error' => "unknown package $p->{pkgnum}" };
my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $p->{pkgnum} } )
or return { 'error' => "unknown package $p->{pkgnum}" };
+ #if someone does need self-service package change of suspended packages,
+ # figure out how to be more discriminating
+ return { error=>"Can't change a suspended package", pkgnum=>$cust_pkg->pkgnum}
+ if $cust_pkg->status eq 'suspended';
+
my @newpkg;
my $error = FS::cust_pkg::order( $custnum,
[$p->{pkgpart}],
my @newpkg;
my $error = FS::cust_pkg::order( $custnum,
[$p->{pkgpart}],