179 logVaultAccess

This commit is contained in:
2025-11-27 16:57:14 +03:00
parent 17238d34f9
commit 84c7d00072
2 changed files with 95 additions and 3 deletions
+16 -1
View File
@@ -19,6 +19,7 @@
<cfcatch type="ANY">
<!---configure right here--->
<!---для ясности--->
<!--- *** кажется, этот подход устарел --->
<cfset this.config.environment = "dev-default" />
<cfset this.config.datasource = "cmdb" />
<cfset this.config.is_dev_default = "true" /><!---это виднее в сообщении об ошибке--->
@@ -51,7 +52,7 @@
//variables.framework.docs={};
variables.framework.docs.APIName="svc-api";
variables.framework.docs.APIVersion="0.178"; /*$ git config --global --unset user.password*/
variables.framework.docs.APIVersion="0.179"; /*$ git config --global --unset user.password*/
variables.framework.globalHeaders = structNew();
variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location";
@@ -284,6 +285,8 @@
var usrCustomerInfo=getUsrCustomerInfo(idpUserData.userInfo.contactId, idpUserData.userInfo.companyId);
//dump(idpUserData);dump(usrCustomerInfo);abort;
if (lCase(arguments.cfc) EQ 'user') {
if (structIsEmpty(usrCustomerInfo)) return representationOf("User information not found").withStatus(404);
}
@@ -294,6 +297,9 @@
arguments.requestArguments.contragentId=-1; //Integer
arguments.requestArguments.contractId=-1; //Integer
arguments.requestArguments.specificationId=-1; //Integer
arguments.requestArguments.isImpersonated=false;
arguments.requestArguments.clientID="";
arguments.requestArguments.login="";
return true;
}
@@ -305,6 +311,15 @@
arguments.requestArguments.contragentId=usrCustomerInfo.contragentId; //Integer
arguments.requestArguments.contractId=usrCustomerInfo.contractId; //Integer
arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //Integer
try {
arguments.requestArguments.isImpersonated=usrCustomerInfo.impersonation.is_impersonated;
arguments.requestArguments.clientID=usrCustomerInfo.clientID;
arguments.requestArguments.login=usrCustomerInfo.login;
} catch (e) {
arguments.requestArguments.isImpersonated=false; // так себе решение, надо было бы NULL
arguments.requestArguments.clientID="";
arguments.requestArguments.login="";
}
return true;