Commit 1465e51d authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files
parent c4236deb
......@@ -6502,10 +6502,7 @@ module OneM2M_PermutationFunctions {
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_ae2Index := -1;
var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_AE_ID}, int63));
var AccessControlRule v_accessControlRule_2;
var SetOfAcrs v_setOfArcs;
// Test control
if(not(PICS_ACP_SUPPORT)) {
setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
......@@ -6518,21 +6515,14 @@ module OneM2M_PermutationFunctions {
// Test adapter configuration
// Preamble
v_acpAuxIndex := f_cse_preamble_createAcpAux(-,-);//c_CRDNDi);
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRUNDi);
v_aeIndex := f_cse_preamble_registerAe(-, -);//c_CRUNDi);
v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, {f_getResourceId(vc_resourcesList[v_aeIndex].resource)},int55);//c_CRDNDi);
f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
//Update ACP Aux to remove DELETE operation rights to AE, keeping rights of SUPER USER to run postamble
v_accessControlRule_2 := valueof(m_createAcr({f_getResourceId(vc_resourcesList[v_aeIndex].resource)}, int55));
v_setOfArcs.accessControlRule_list := {v_accessControlRule_1, v_accessControlRule_2};
v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -));
f_cse_updateResource(int1, vc_acpAuxIndex, v_updateRequest);
//Adjustments for ACP resource type
if(p_resourceType == int1) {
p_createRequestPrimitive.primitiveContent.accessControlPolicy.selfPrivileges.accessControlRule_list := {v_accessControlRule_2};//{v_accessControlRule_1,v_accessControlRule_2};
p_createRequestPrimitive.primitiveContent.accessControlPolicy.selfPrivileges.accessControlRule_list := {m_createAcr({f_getResourceId(vc_resourcesList[v_aeIndex].resource)}, int55)};
} else {
p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
}
......@@ -6574,8 +6564,6 @@ module OneM2M_PermutationFunctions {
}
// Postamble
// We are forced to delete the Ae because the delete request in the postamble_deleteResources is sent by Ae itself, witch doesn't have privileges
f_cse_deleteResource(v_aeIndex, m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator()));//Use of PX_SUPER_AE_ID to remove AE
f_cse_postamble_deleteResources();
// Tear down
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment