099 resourceRealm fix
This commit is contained in:
@@ -340,14 +340,15 @@
|
||||
<cffunction name="checkCfsResourceRealmAccess">
|
||||
<cfargument name="instanceOperationUid" type="guid">
|
||||
|
||||
<cfset var local={}/>
|
||||
<cfset var local={}/>
|
||||
|
||||
<!--- структура cfs и rfs параметров отличается, поэтому селекты разные --->
|
||||
<!--- Проверяем наличие CFS параметра resourceRealm у операции инстанса (не глядя на то, определен он или нет у операции сервиса) --->
|
||||
<!--- структура cfs и rfs параметров отличается, поэтому селекты разные --->
|
||||
<cfquery name="local.qParam">
|
||||
select sop.svc_operation_cfs_param
|
||||
from instance_operation io
|
||||
join instance e on (io.instance_uid=e.instance_uid)
|
||||
join svc_operation so on (e.service_id=so.svc_id)
|
||||
join svc_operation so on (e.service_id=so.svc_id AND io.operation=so.operation)
|
||||
join svc_operation_cfs_param sop on (so.svc_operation_id=sop.svc_operation_id)
|
||||
where io.instance_operation_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceOperationUid#" null=#!isValid("guid",arguments.instanceOperationUid)#/>
|
||||
AND LOWER(sop.svc_operation_cfs_param)=LOWER('resourceRealm')
|
||||
@@ -374,6 +375,7 @@
|
||||
</cfquery>
|
||||
|
||||
<!--- пробегаемся по CFS параметрам данной операции--->
|
||||
<!---*** Нужно проверять только для тех операций, которые предусматривают resourceRealm --->
|
||||
<cfquery name="local.qCheckResourceRealmAccess">
|
||||
select r.resource_realm_id, r.resource_realm, sop.svc_operation_cfs_param, iop.param_value, a.contract_id, a.is_enabled
|
||||
from instance_operation_cfs_param iop
|
||||
@@ -386,7 +388,7 @@
|
||||
</cfquery>
|
||||
|
||||
<cfif local.qCheckResourceRealmAccess.recordCount EQ 0>
|
||||
<cfthrow message="resource realm specified in CFS params is not available for current contract" detail="CFS resource realm unawailable. Instance operation UID #arguments.instanceOperationUid#. Contract ID #arguments.contractId#"/>
|
||||
<cfthrow message="resource realm specified in CFS params is not available for current contract" detail="CFS resource realm unawailable. Instance operation UID #arguments.instanceOperationUid#. Contract ID #local.qContract.contract_id#"/>
|
||||
<cfelse>
|
||||
<!--- <cfdump var=#local.qCheckResourceRealmAccess#/><cfabort/> --->
|
||||
<!--- <cfthrow detail="wefwewewewewewer2r24"/> --->
|
||||
@@ -398,7 +400,7 @@
|
||||
<cfargument name="instanceOperationUid" type="guid">
|
||||
|
||||
<cfset var local={}/>
|
||||
|
||||
<!--- Проверяем наличие RFS параметра resourceRealm у операции сервиса --->
|
||||
<cfquery name="local.qParam">
|
||||
select iop.param
|
||||
from instance_operation io
|
||||
@@ -439,7 +441,7 @@
|
||||
</cfquery>
|
||||
|
||||
<cfif local.qCheckResourceRealmAccess.recordCount EQ 0>
|
||||
<cfthrow message="resource realm specified in RFS params is not available for current contract" detail="RFS resource realm unawailable. Instance operation UID #arguments.instanceOperationUid#. Contract ID #arguments.contractId#"/>
|
||||
<cfthrow message="resource realm specified in RFS params is not available for current contract" detail="RFS resource realm unawailable. Instance operation UID #arguments.instanceOperationUid#. Contract ID #local.qContract.contract_id#"/>
|
||||
<cfelse>
|
||||
<!--- <cfdump var=#local.qCheckResourceRealmAccess#/><cfabort/> --->
|
||||
<!--- <cfthrow detail="wefwewewewewewer2r24"/> --->
|
||||
|
||||
Reference in New Issue
Block a user