209 unmapped user early exception
This commit is contained in:
+17
-9
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
//variables.framework.docs={};
|
//variables.framework.docs={};
|
||||||
variables.framework.docs.APIName="svc-api";
|
variables.framework.docs.APIName="svc-api";
|
||||||
variables.framework.docs.APIVersion="0.208"; /*$ git config --global --unset user.password*/
|
variables.framework.docs.APIVersion="0.209"; /*$ git config --global --unset user.password*/
|
||||||
|
|
||||||
variables.framework.globalHeaders = structNew();
|
variables.framework.globalHeaders = structNew();
|
||||||
variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location";
|
variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location";
|
||||||
@@ -276,11 +276,7 @@
|
|||||||
result = prefix.filecontent;
|
result = prefix.filecontent;
|
||||||
//writedump(result);abort;
|
//writedump(result);abort;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
/*if (fileExists("#GetDirectoryFromPath(GetCurrentTemplatePath())#/etc/local-debug")) { //true for local debug without IDP, etc/* does not go to repository
|
|
||||||
var result='{"accounts":[{"login":"","type":"telegram"}],"avatar":["d2d2b7ac-50af-432b-b7c4-f7d6561e288a"],"company":"ООО «НУБЕС»","companyId":"8ec70ac0-546d-42a7-8cff-339c8fb51a23","contactId":"983967a3-58c2-4cdd-84a5-8b427ccfac82","email":"smishchuk@nubes.ru","externalUser":false,"fio":{"fullName":"Мищук Сергей ","name":"Сергей","secondName":"","surname":"Мищук"},"groupIds":["94bf5be7-52f4-5c13-87c3-513786934685","ab12b6b8-0265-4683-a5c2-5e1a74a55216","aff008c3-7443-50f6-86e1-ecff3cd3b04d","d6000da0-c9aa-55eb-9882-f118b432730b","d89a33dc-3177-5854-9580-f7f860a5ab7c","ddfe2555-9ef4-42cb-9a2b-7f24e61e7747","df12926f-ecb8-5479-857f-6d291464baad","fda5c295-230a-5025-9797-b8b4e99e08aa","2be9b4b6-94d1-59f9-a649-cab228d82169","64fe6f5c-a91b-5fea-a7ca-d9823701ebd4"],"integration":{"serviceId":""},"login":"smishchuk@nubes.ru","mobilePhone":[],"position":"","userId":"d72530e1-66a4-412f-a046-38153c4e5405"}';}
|
|
||||||
*/
|
|
||||||
//writedump(resp);
|
|
||||||
//return representationOf( {"exception"=e} );
|
|
||||||
return representationOf( {"exception"=e, "idpResponse"=result} ).withStatus(200);
|
return representationOf( {"exception"=e, "idpResponse"=result} ).withStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,12 +285,11 @@
|
|||||||
var idpUserData=deserializeJson(result);
|
var idpUserData=deserializeJson(result);
|
||||||
arguments.requestArguments.companyUid=idpUserData.userInfo.companyId;//GUID!
|
arguments.requestArguments.companyUid=idpUserData.userInfo.companyId;//GUID!
|
||||||
arguments.requestArguments.usrUid=idpUserData.userInfo.contactId;//userId; //GUID!
|
arguments.requestArguments.usrUid=idpUserData.userInfo.contactId;//userId; //GUID!
|
||||||
|
|
||||||
|
var usrCustomerInfo=getUsrCustomerInfo(idpUserData.userInfo.contactId, idpUserData.userInfo.companyId);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return representationOf( {"exception"=e, "idpResponse"=result} );
|
return representationOf( {"exception"=e, "idpResponse"=result} );
|
||||||
}
|
}
|
||||||
|
|
||||||
var usrCustomerInfo=getUsrCustomerInfo(idpUserData.userInfo.contactId, idpUserData.userInfo.companyId);
|
|
||||||
|
|
||||||
//dump(idpUserData);dump(usrCustomerInfo);abort;
|
//dump(idpUserData);dump(usrCustomerInfo);abort;
|
||||||
|
|
||||||
if (lCase(arguments.cfc) EQ 'user') {
|
if (lCase(arguments.cfc) EQ 'user') {
|
||||||
@@ -431,6 +426,13 @@
|
|||||||
<cfargument name="usrUid"/>
|
<cfargument name="usrUid"/>
|
||||||
<cfargument name="contragentUid"/>
|
<cfargument name="contragentUid"/>
|
||||||
|
|
||||||
|
<cfif !isValid('guid',arguments.usrUid)>
|
||||||
|
<cfthrow message="Invalid user uuid" detail="uuid=(#arguments.usrUid#) is not a valid UUID"/>
|
||||||
|
</cfif>
|
||||||
|
<cfif !isValid('guid',arguments.contragentUid)>
|
||||||
|
<cfthrow message="Invalid contragent uuid" detail="uuid=(#arguments.contragentUid#) is not a valid UUID"/>
|
||||||
|
</cfif>
|
||||||
|
|
||||||
<!--- глупейшее определение спецификации по умолчанию (надо переделать, чтобы создавалась, или вообще просто записывать факты без спеки). Но помним, что при постановке на тестирование цены еше не фиксированы --->
|
<!--- глупейшее определение спецификации по умолчанию (надо переделать, чтобы создавалась, или вообще просто записывать факты без спеки). Но помним, что при постановке на тестирование цены еше не фиксированы --->
|
||||||
<!--- заметим, что у нас контрагент может быть определен параллельно, от IDP --->
|
<!--- заметим, что у нас контрагент может быть определен параллельно, от IDP --->
|
||||||
<cfset local={}/>
|
<cfset local={}/>
|
||||||
@@ -447,6 +449,9 @@
|
|||||||
order by s.specification_id desc
|
order by s.specification_id desc
|
||||||
limit 1;
|
limit 1;
|
||||||
</cfquery>
|
</cfquery>
|
||||||
|
<cfif local.qGetContragentInfo.recordCount EQ 0>
|
||||||
|
<cfthrow message="Contragent Not Found in CMDB" detail="Contragent with uuid=(#arguments.contragentUid#) not found in CMDB"/>
|
||||||
|
</cfif>
|
||||||
|
|
||||||
|
|
||||||
<cfquery name="local.qGetUserInfo">
|
<cfquery name="local.qGetUserInfo">
|
||||||
@@ -458,6 +463,9 @@
|
|||||||
order by s.specification_id desc
|
order by s.specification_id desc
|
||||||
limit 1;
|
limit 1;
|
||||||
</cfquery>
|
</cfquery>
|
||||||
|
<cfif local.qGetUserInfo.recordCount EQ 0>
|
||||||
|
<cfthrow message="User Not Found in CMDB" detail="User with uuid=(#arguments.contragentUid#) not found in CMDB"/>
|
||||||
|
</cfif>
|
||||||
|
|
||||||
<!--- <cfdump var=#local.qGetCustomerInfo#/><cfabort/> --->
|
<!--- <cfdump var=#local.qGetCustomerInfo#/><cfabort/> --->
|
||||||
<cfreturn {
|
<cfreturn {
|
||||||
|
|||||||
Reference in New Issue
Block a user