2024-08-16 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in the RDXport service that couldcause the IMPORT call
	to return a 'no such cart' error when trying to create a new cart.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2024-08-16 16:34:51 -04:00
parent 9bef1ee001
commit 09c7c82c26
2 changed files with 15 additions and 6 deletions

View File

@ -24852,3 +24852,6 @@
2024-08-12 Fred Gleason <fredg@paravelsystems.com>
* Incremented the package version to 4.3.0int3.
* Incremented the python api version to 4.3.0.post3.
2024-08-16 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the RDXport service that couldcause the IMPORT call
to return a 'no such cart' error when trying to create a new cart.

View File

@ -102,15 +102,21 @@ void Xport::Import()
//
// Verify User Perms
//
if(RDCart::exists(cartnum)) {
if(!rda->user()->cartAuthorized(cartnum)) {
XmlExit("No such cart",404,"import.cpp",LINE_NUMBER);
if(create&&(cartnum==0)&&(cutnum==0)) {
if(!rda->user()->groupAuthorized(group_name)) {
XmlExit("No such group",404,"import.cpp",LINE_NUMBER);
}
}
else {
if(create) {
if(!rda->user()->groupAuthorized(group_name)) {
XmlExit("No such group",404,"import.cpp",LINE_NUMBER);
if(cartnum==0) {
XmlExit("No such cart",404,"import.cpp",LINE_NUMBER);
}
if(cutnum==0) {
XmlExit("No such cut",404,"import.cpp",LINE_NUMBER);
}
if(RDCart::exists(cartnum)) {
if(!rda->user()->cartAuthorized(cartnum)) {
XmlExit("No such cart",404,"import.cpp",LINE_NUMBER);
}
}
else {