Skip to content

Commit

Permalink
Change oid of Protected Mark to 800
Browse files Browse the repository at this point in the history
  • Loading branch information
tonydamage committed Feb 27, 2023
1 parent 6a20f51 commit 0b66e29
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ private void markProtectedShadow(IModel<SelectableBean<ShadowType>> model, AjaxR
for (SelectableBean<ShadowType> shadow : selected) {
try {
var policyStat = new PolicyStatementType()
.markRef(SystemObjectsType.MARK_PROTECTED_SHADOW.value(), MarkType.COMPLEX_TYPE)
.markRef(SystemObjectsType.MARK_PROTECTED.value(), MarkType.COMPLEX_TYPE)
.type(PolicyStatementTypeType.APPLY);
var delta = getPageBase().getPrismContext().deltaFactory().object()
.createModificationAddContainer(ShadowType.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15758,10 +15758,10 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="00000000-0000-0000-0000-000000000750">
<xsd:enumeration value="00000000-0000-0000-0000-000000000800">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="MARK_PROTECTED_SHADOW"/>
<jaxb:typesafeEnumMember name="MARK_PROTECTED"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public interface CommonInitialObjects {
SystemObjectsType.MARK_SHADOW_CORRELATION_STATE_CHANGED.value());

TestObject<MarkType> MARK_PROTECTED_SHADOW = TestObject.classPath(
MARKS, "750-mark-protected-shadow.xml",
SystemObjectsType.MARK_PROTECTED_SHADOW.value());
MARKS, "800-mark-protected-shadow.xml",
SystemObjectsType.MARK_PROTECTED.value());

String PARAM_SIMULATION_RESULT_REF = "simulationResultRef";
String PARAM_PATHS_TO_INCLUDE = "pathsToInclude";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ public abstract class AbstractDummyTest extends AbstractProvisioningIntegrationT


protected static final TestObject<MarkType> MARK_PROTECTED_SHADOW = TestObject.classPath(
"initial-objects/mark", "750-mark-protected-shadow.xml",
SystemObjectsType.MARK_PROTECTED_SHADOW.value());
"initial-objects/mark", "800-mark-protected-shadow.xml",
SystemObjectsType.MARK_PROTECTED.value());

@Autowired
protected ProvisioningContextFactory provisioningContextFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public class TestDummyShadowMarks extends AbstractBasicDummyTest {
SystemObjectsType.ARCHETYPE_SHADOW_MARK.value());

private static final TestObject<MarkType> TAG_PROTECTED_SHADOW = TestObject.classPath(
"initial-objects/mark", "750-mark-protected-shadow.xml",
SystemObjectsType.MARK_PROTECTED_SHADOW.value());
"initial-objects/mark", "800-mark-protected-shadow.xml",
SystemObjectsType.MARK_PROTECTED.value());


String piratesIcfUid;
Expand Down Expand Up @@ -150,7 +150,7 @@ public void test200MarkShadowProtected() throws Exception {
assertNull("" + account + " is not protected", account.asObjectable().isProtectedObject());

PolicyStatementType policyStat = new PolicyStatementType()
.markRef(SystemObjectsType.MARK_PROTECTED_SHADOW.value(), MarkType.COMPLEX_TYPE)
.markRef(SystemObjectsType.MARK_PROTECTED.value(), MarkType.COMPLEX_TYPE)
.type(PolicyStatementTypeType.APPLY);

ObjectDelta<ShadowType> shadowDelta = prismContext.deltaFactory().object()
Expand Down Expand Up @@ -396,7 +396,7 @@ public void test400RemoveProtectedMark() throws Exception {


PolicyStatementType policyStat = new PolicyStatementType()
.markRef(SystemObjectsType.MARK_PROTECTED_SHADOW.value(), MarkType.COMPLEX_TYPE)
.markRef(SystemObjectsType.MARK_PROTECTED.value(), MarkType.COMPLEX_TYPE)
.type(PolicyStatementTypeType.APPLY);
ObjectDelta<ShadowType> shadowDelta = prismContext.deltaFactory().object()
.createModificationDeleteContainer(ShadowType.class, ACCOUNT_DAEMON_OID, ShadowType.F_POLICY_STATEMENT, policyStat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public class TestSynchronization extends AbstractIntegrationTest {


protected static final TestObject<MarkType> MARK_PROTECTED_SHADOW = TestObject.classPath(
"initial-objects/mark", "750-mark-protected-shadow.xml",
SystemObjectsType.MARK_PROTECTED_SHADOW.value());
"initial-objects/mark", "800-mark-protected-shadow.xml",
SystemObjectsType.MARK_PROTECTED.value());

private static final File TEST_DIR = new File("src/test/resources/synchronization/");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected abstract ObjectOperationPolicyType computeEffectivePolicy(

}

private static final String MARK_PROTECTED_SHADOW_OID = SystemObjectsType.MARK_PROTECTED_SHADOW.value();
private static final String MARK_PROTECTED_SHADOW_OID = SystemObjectsType.MARK_PROTECTED.value();

private static ObjectOperationPolicyHelper instance = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->

<mark xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
oid="00000000-0000-0000-0000-000000000750">
oid="00000000-0000-0000-0000-000000000800">
<name>Protected</name>
<assignment>
<targetRef oid="00000000-0000-0000-0000-000000000701" type="ArchetypeType"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.springframework.test.context.ContextConfiguration;

import com.evolveum.midpoint.model.test.AbstractModelIntegrationTest;
import com.evolveum.midpoint.model.test.CommonInitialObjects;
import com.evolveum.midpoint.prism.PrismConstants;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.PrismReference;
Expand Down Expand Up @@ -103,6 +104,11 @@ public void initSystem(Task initTask, OperationResult initResult) throws Excepti

repoAdd(ARCHETYPE_CORRELATION_CASE, initResult);

if (areMarksSupported()) {
repoAdd(CommonInitialObjects.ARCHETYPE_OBJECT_MARK, initResult);
repoAdd(CommonInitialObjects.MARK_PROTECTED_SHADOW, initResult);
}

// User administrator
userAdministrator = repoAddObjectFromFile(USER_ADMINISTRATOR_FILE, initResult);
repoAddObjectFromFile(USER_JACK_FILE, true, initResult);
Expand Down

0 comments on commit 0b66e29

Please sign in to comment.