067 usrId argument removed from annotations
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
left outer join usr u on (e.updater_id=u.usr_id)
|
||||
where e.instance_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceUid#" null=#!isValid('guid',arguments.instanceUid)#/>
|
||||
AND s.specification_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.specificationId#/><!--- access protection --->
|
||||
</cfquery> <!--- *** правильнее при попытке доступа к чужому инстансу (НСД) выбрасывать 403, а тут будет 404 --->
|
||||
</cfquery> <!--- *** правильнее при попытке доступа к чужому инстансу (НСД) выбрасывать 403, а тут будет 404, но так тоже делают, например, в gitea --->
|
||||
|
||||
<cfif local.qInstance.recordCount EQ 0>
|
||||
<cfreturn representationOf("Instance not found or no permission to view").withStatus(404)/>
|
||||
@@ -77,7 +77,6 @@
|
||||
|
||||
<!--- <cfdump var=#local.qInstance#/><cfabort/> --->
|
||||
|
||||
|
||||
<!--- операция, создавшая текущее состояние --->
|
||||
<!--- *** странноватый селект --->
|
||||
<cfquery name="local.qOperation" result="local.result">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<cffunction name="get" hint="Шаблон экземпляра"><!--- *** TODO проверка принадлежности тенанту --->
|
||||
<cfargument name="svcId" type="string" required=true hint="type:integer"/>
|
||||
<cfargument name="usrId" type="string" required=true hint="type:integer"/><!--- arguments.usrId неявно вбрасывается из Application.cfm --->
|
||||
<!--- <cfargument name="usrId" type="string" hint="type:integer; no need to provide this argument in request, it is injected by IAM"/> ---><!--- arguments.usrId неявно вбрасывается из Application.cfm --->
|
||||
|
||||
<cftry>
|
||||
<cfset this.helper.validateField(arguments, "svcId", "integer")/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<cffunction name="get" hint="Шаблон операции экземпляра"><!--- *** TODO проверка принадлежности тенанту --->
|
||||
<cfargument name="svcOperationId" type="string" required=true hint="type:integer"/>
|
||||
<cfargument name="usrId" type="string" required=true hint="type:integer"/><!--- arguments.usrId неявно инжектируется из Application.cfm --->
|
||||
<!--- <cfargument name="usrId" type="string" hint="type:integer; no need to provide this argument in request, it is injected by IAM"/> ---><!--- arguments.usrId неявно инжектируется из Application.cfm --->
|
||||
|
||||
<cftry>
|
||||
<cfset this.helper.validateField(arguments, "svcOperationId", "integer")/>
|
||||
|
||||
@@ -72,8 +72,10 @@
|
||||
<cfelse>
|
||||
<cfset local.cfsParamChecker.checkParam(local.qCheckCfsParams.svc_operation_cfs_param_id, qCheckCfsParams.param_value, qCheckCfsParams.instance_operation_cfs_param_uid)/>
|
||||
</cfif>
|
||||
</cfloop><!--- <cfdump var=#local.qCheckCfsParams#/><cfabort/> --->
|
||||
|
||||
</cfloop><!--- <cfdump var=#local.qCheckCfsParams#/><cfabort/> --->
|
||||
|
||||
<!--- ***** тут должен быть контроль доступа на уровне параметров. Желательно по максимуму параноидальный --->
|
||||
<!--- ***** или при сабмите. Может быть, и на уровне RFS параметров тоже --->
|
||||
<cfset generateRfsParams(arguments.instanceOperationUid, arguments.usrId)/>
|
||||
<cfset submitJob(arguments.instanceOperationUid)/>
|
||||
|
||||
@@ -86,7 +88,7 @@
|
||||
</cftry>
|
||||
<!--- <cfreturn representationOf("Not Implemented yet").withStatus(501)/> --->
|
||||
|
||||
<cfset generateRfsParams(arguments.instanceOperationUid)/>
|
||||
<cfset generateRfsParams(arguments.instanceOperationUid)/><!--- *** а это зачем? прокомментировать --->
|
||||
|
||||
<!--- --->
|
||||
<cfreturn noData().withStatus(201, "Created") />
|
||||
@@ -96,7 +98,7 @@
|
||||
|
||||
<cffunction name="generateRfsParams">
|
||||
<cfargument name="instanceOperationUid" type="guid"/>
|
||||
<cfargument name="usrId" type="numeric"/>
|
||||
<cfargument name="usrId" type="numeric"/><!--- *** инжектируется? --->
|
||||
<!---
|
||||
-- полезный селект, не выбрасывать
|
||||
<cfquery name="qSvcOperationCfsParam">
|
||||
@@ -256,6 +258,7 @@
|
||||
|
||||
</cffunction>
|
||||
|
||||
<!--- *** судя по всему, RFS параметр не обязан быть специфицирован на сервисе (никак не проверяется) --->
|
||||
<cffunction name="setInstanceOperationRfsParam">
|
||||
<cfargument name="instanceOperationUid" type="guid">
|
||||
<cfargument name="param"><!--- значение не должно содержать лишних пробелов, чувствительность к регистру определяется БД --->
|
||||
|
||||
@@ -65,10 +65,13 @@
|
||||
from resource_realm r
|
||||
join resource_realm_type t on (r.resource_realm_type_id=t.resource_realm_type_id)
|
||||
left outer join resource_realm p on (r.parent_id=p.resource_realm_id)
|
||||
--join resource_realm_access a on a.
|
||||
join resource_realm_access a on
|
||||
(r.resource_realm_id=a.resource_realm_id
|
||||
AND a.contract_id=<cfqueryparam cfsqltype="CF_SQL_INTEGER" value=#arguments.contractId#/>
|
||||
AND a.is_enabled)
|
||||
where 1=1 <m:filter_build filter=#filter#/>
|
||||
order by <m:order_build sortCollection=#this.helper.parseNumericOrder(local.titleMap, arguments.orderBy)# fieldCount=0/><!---no sort length limit--->
|
||||
--limit #maxrows#
|
||||
limit #maxrows#
|
||||
</cfquery>
|
||||
|
||||
<cftry>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<cffunction name="get" hint="Шаблон экземпляра"><!--- *** TODO проверка принадлежности тенанту --->
|
||||
<cfargument name="svcId" type="string" required=true hint="type:integer"/>
|
||||
<cfargument name="usrId" type="string" required=true hint="type:integer"/><!--- arguments.usrId неявно вбрасывается из Application.cfm --->
|
||||
<!--- <cfargument name="usrId" type="string" /> ---><!--- arguments.usrId неявно инжектируется из Application.cfm --->
|
||||
|
||||
<cftry>
|
||||
<cfset this.helper.validateField(arguments, "svcId", "integer")/>
|
||||
|
||||
Reference in New Issue
Block a user