146 request.usr_id bugfix

This commit is contained in:
msyu
2025-09-25 11:34:55 +03:00
parent eb599310cc
commit f3f00423e9
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -51,7 +51,7 @@
//variables.framework.docs={};
variables.framework.docs.APIName="svc-api";
variables.framework.docs.APIVersion="0.145"; /*$ git config --global --unset user.password*/
variables.framework.docs.APIVersion="0.146"; /*$ git config --global --unset user.password*/
variables.framework.globalHeaders = structNew();
variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location";
@@ -313,7 +313,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In
<cfargument name="paramValue" type="string"/>
<cfargument name="scope" type="string"/>
<cfargument name="instanceOperationCfsParamUid" type="guid"/>
<!--- request.usr_id passed implicitly --->
<!--- arguments.usrId passed implicitly --->
<cfset var local={}/>
<cfswitch expression=#arguments.scope#>
@@ -350,7 +350,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In
join usr u on (k.contragent_id=u.contragent_id)
where p.param_value=<cfqueryparam cfsqltype="cf_sql_varchar" value=#arguments.paramValue#/>
AND svc_operation_cfs_param_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.svcOperationCfsParamId#/>/*limit to the current svc param*/
AND u.usr_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#request.usr_id#/>/*limit to the contragent of current user*/
AND u.usr_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.usrId#/>/*limit to the contragent of current user*/
<cfif arguments.instanceOperationCfsParamUid NEQ "00000000-0000-0000-0000-000000000000">
<!--- не решаюсь оставить эту проверку на БД, потому что наличие записи с 00000000-0000-0000-0000-000000000000 может все сломать --->
AND p.instance_operation_cfs_param_uid <> <cfqueryparam cfsqltype="cf_sql_other" value=#arguments.instanceOperationCfsParamUid#/>/*exclude itself*/