From 415e769dfb1d7c926648026d7c4985c576db6368 Mon Sep 17 00:00:00 2001 From: lskublik Date: Mon, 6 Apr 2020 13:41:50 +0200 Subject: [PATCH 1/8] change link in system configuration for dashboard link box MID-6174 --- .../000-system-configuration.xml | 1416 ++++++++--------- 1 file changed, 708 insertions(+), 708 deletions(-) diff --git a/gui/admin-gui/src/main/resources/initial-objects/000-system-configuration.xml b/gui/admin-gui/src/main/resources/initial-objects/000-system-configuration.xml index 06b08f58cc8..bf47e85552c 100644 --- a/gui/admin-gui/src/main/resources/initial-objects/000-system-configuration.xml +++ b/gui/admin-gui/src/main/resources/initial-objects/000-system-configuration.xml @@ -1,708 +1,708 @@ - - - - SystemConfiguration - - - - - - - ERROR - ro.isdc.wro.extensions.processor.css.Less4jProcessor - - - - OFF - org.hibernate.engine.jdbc.spi.SqlExceptionHelper - - - - OFF - org.hibernate.engine.jdbc.batch.internal.BatchingBatch - - - - WARN - org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl - - - - OFF - org.hibernate.internal.ExceptionMapperStandardImpl - - - - OFF - net.sf.jasperreports.engine.fill.JRFillDataset - - - - WARN - org.apache.wicket.resource.PropertiesFactory - - - - ERROR - org.springframework.context.support.ResourceBundleMessageSource - - - - INFO - com.evolveum.midpoint.model.impl.lens.projector.Projector - - - - INFO - com.evolveum.midpoint.model.impl.lens.Clockwork - - - - %date [%X{subsystem}] [%thread] %level \(%logger\): %msg%n - ${midpoint.home}/log/midpoint.log - ${midpoint.home}/log/midpoint-%d{yyyy-MM-dd}.%i.log - 10 - 100MB - true - - - - %date %level: %msg%n - ${midpoint.home}/log/midpoint-profile.log - ${midpoint.home}/log/midpoint-profile-%d{yyyy-MM-dd}.%i.log - 10 - 100MB - true - - MIDPOINT_LOG - INFO - - false -
false
-
-
- - - P3M - - - P1M - - - - - - performance - Performance tracing - true - true - performance-trace %{timestamp} %{focusName} %{milliseconds} - true - true - - - functional - Functional tracing - true - functional-trace %{timestamp} %{focusName} - true - true - true - - normal - - - - functional-model-logging - Functional tracing (with model logging) - true - functional-trace %{timestamp} %{focusName} - true - true - true - - - com.evolveum.midpoint.model - TRACE - - - - normal - - - - functional-sql-logging - Functional tracing (with SQL logging) - true - functional-trace %{timestamp} %{focusName} - true - true - true - - - org.hibernate.SQL - TRACE - - - - normal - - - - - - - /self/profile - - View/edit your profile - - fa fa-user - - green - http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfProfile - http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll - - - /self/credentials - - View/edit your credentials - - fa fa-shield - - blue - http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfCredentials - http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll - - - /admin/users - - - fa fa-users - - red - http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#users - - - /admin/resources - - - fa fa-database - - purple - http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#resources - - - - my-cases - - - - My cases - My case - - fe fe-case-object - - - 1000 - CaseType - - - - - - - manual-case-view - - - - All manual cases - Manual case - Manual provisioning cases - - 1010 - CaseType - - - - - - - operation-request-case-view - - - - All requests - Request - Operation requests - - 1020 - CaseType - - - - - - - approval-case-view - - - - All approvals - Approval - Approval cases - - 1030 - CaseType - - - - - - - reconciliation-tasks-view - 30 - TaskType - - - - - - recomputation-tasks-view - 30 - TaskType - - - - - - import-tasks-view - 30 - TaskType - - - - - - live-sync-tasks-view - 30 - TaskType - - - - - - async-update-tasks-view - 30 - TaskType - - - - - - cleanup-tasks-view - 30 - TaskType - - - - - - report-tasks-view - 30 - TaskType - - - - - - single-bulk-action-tasks-view - 30 - TaskType - - - - - - iterative-bulk-action-tasks-view - 30 - TaskType - - - - - - certification-tasks-view - 30 - TaskType - - - - - - approval-tasks-view - 30 - TaskType - - - - - - utility-tasks-view - 30 - TaskType - - - - - - system-tasks-view - 30 - TaskType - - - - - - - - c:TaskType - - 150 - - - - - cleanupAfterCompletion - - - threadStopAction - - - binding - - - dependent - - - - 900 - - - - - executionStatus - - - node - - - nodeAsObserved - - - resultStatus - - - result - - - nextRunStartTimestamp - - - nextRetryTimestamp - - - unpauseAction - - - taskIdentifier - - - parent - - - waitingReason - - - stateBeforeSuspend - - - category - - - handlerUri - - - otherHandlersUriStack - - - channel - - - subtaskRef - - - dependentTaskRef - - - lastRunStartTimestamp - - - lastRunFinishTimestamp - - - completionTimestamp - - - - 910 - hidden - - - - - progress - - - expectedTotal - - - stalledSince - - - - - - - - - - safe - - "Safe" expression profile. It is supposed to contain only operations that are "safe", - i.e. operations that have very little risk to harm the system, circumvent midPoint security - and so on. Use of those operations should be reasonably safe in all expressions. - However, there are limitations. This profile may incomplete or it may even be not completely secure. - Proper security testing of this profile was not yet conducted. It is provided here "AS IS", - without any guarantees. Use at your own risk. - - deny - - asIs - allow - - - path - allow - - - value - allow - - - const - allow - - - script - deny - - - - - script-safe - deny - - com.evolveum.midpoint.xml.ns._public.common.common_3 - MidPoint common schema - generated bean classes - allow - - - com.evolveum.prism.xml.ns._public.types_3 - Prism schema - bean classes - allow - - - java.lang.Integer - allow - - - java.lang.Object - Basic Java operations. - deny - - equals - allow - - hashCode - allow - - - - java.lang.String - String operations are generally safe. But Groovy is adding execute() method which is very dangerous. - allow - - execute - deny - - - - java.lang.CharSequence - allow - - - java.lang.Enum - allow - - - java.util.List - List operations are generally safe. But Groovy is adding execute() method which is very dangerous. - allow - - execute - deny - - - - java.util.ArrayList - List operations are generally safe. But Groovy is adding execute() method which is very dangerous. - allow - - execute - deny - - - - java.util.Map - allow - - - java.util.HashMap - allow - - - java.util.Date - allow - - - javax.xml.namespace.QName - allow - - - javax.xml.datatype.XMLGregorianCalendar - allow - - - java.lang.System - Just a few methods of System are safe enough. - deny - - currentTimeMillis - allow - - - - java.lang.IllegalStateException - Basic Java exception. Also used in test. - allow - - - java.lang.IllegalArgumentException - Basic Java exception. - allow - - - com.evolveum.midpoint.model.common.expression.functions.BasicExpressionFunctions - MidPoint basic functions library - allow - - - com.evolveum.midpoint.model.common.expression.functions.LogExpressionFunctions - MidPoint logging functions library - allow - - - com.evolveum.midpoint.report.impl.ReportFunctions - MidPoint report functions library - allow - - - org.apache.commons.lang.StringUtils - Apache Commons: Strings - allow - - - - - - - -
+ + + + SystemConfiguration + + + + + + + ERROR + ro.isdc.wro.extensions.processor.css.Less4jProcessor + + + + OFF + org.hibernate.engine.jdbc.spi.SqlExceptionHelper + + + + OFF + org.hibernate.engine.jdbc.batch.internal.BatchingBatch + + + + WARN + org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl + + + + OFF + org.hibernate.internal.ExceptionMapperStandardImpl + + + + OFF + net.sf.jasperreports.engine.fill.JRFillDataset + + + + WARN + org.apache.wicket.resource.PropertiesFactory + + + + ERROR + org.springframework.context.support.ResourceBundleMessageSource + + + + INFO + com.evolveum.midpoint.model.impl.lens.projector.Projector + + + + INFO + com.evolveum.midpoint.model.impl.lens.Clockwork + + + + %date [%X{subsystem}] [%thread] %level \(%logger\): %msg%n + ${midpoint.home}/log/midpoint.log + ${midpoint.home}/log/midpoint-%d{yyyy-MM-dd}.%i.log + 10 + 100MB + true + + + + %date %level: %msg%n + ${midpoint.home}/log/midpoint-profile.log + ${midpoint.home}/log/midpoint-profile-%d{yyyy-MM-dd}.%i.log + 10 + 100MB + true + + MIDPOINT_LOG + INFO + + false +
false
+
+
+ + + P3M + + + P1M + + + + + + performance + Performance tracing + true + true + performance-trace %{timestamp} %{focusName} %{milliseconds} + true + true + + + functional + Functional tracing + true + functional-trace %{timestamp} %{focusName} + true + true + true + + normal + + + + functional-model-logging + Functional tracing (with model logging) + true + functional-trace %{timestamp} %{focusName} + true + true + true + + + com.evolveum.midpoint.model + TRACE + + + + normal + + + + functional-sql-logging + Functional tracing (with SQL logging) + true + functional-trace %{timestamp} %{focusName} + true + true + true + + + org.hibernate.SQL + TRACE + + + + normal + + + + + + + /self/profile/user + + View/edit your profile + + fa fa-user + + green + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfProfile + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll + + + /self/credentials + + View/edit your credentials + + fa fa-shield + + blue + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfCredentials + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll + + + /admin/users + + + fa fa-users + + red + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#users + + + /admin/resources + + + fa fa-database + + purple + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#resources + + + + my-cases + + + + My cases + My case + + fe fe-case-object + + + 1000 + CaseType + + + + + + + manual-case-view + + + + All manual cases + Manual case + Manual provisioning cases + + 1010 + CaseType + + + + + + + operation-request-case-view + + + + All requests + Request + Operation requests + + 1020 + CaseType + + + + + + + approval-case-view + + + + All approvals + Approval + Approval cases + + 1030 + CaseType + + + + + + + reconciliation-tasks-view + 30 + TaskType + + + + + + recomputation-tasks-view + 30 + TaskType + + + + + + import-tasks-view + 30 + TaskType + + + + + + live-sync-tasks-view + 30 + TaskType + + + + + + async-update-tasks-view + 30 + TaskType + + + + + + cleanup-tasks-view + 30 + TaskType + + + + + + report-tasks-view + 30 + TaskType + + + + + + single-bulk-action-tasks-view + 30 + TaskType + + + + + + iterative-bulk-action-tasks-view + 30 + TaskType + + + + + + certification-tasks-view + 30 + TaskType + + + + + + approval-tasks-view + 30 + TaskType + + + + + + utility-tasks-view + 30 + TaskType + + + + + + system-tasks-view + 30 + TaskType + + + + + + + + c:TaskType + + 150 + + + + + cleanupAfterCompletion + + + threadStopAction + + + binding + + + dependent + + + + 900 + + + + + executionStatus + + + node + + + nodeAsObserved + + + resultStatus + + + result + + + nextRunStartTimestamp + + + nextRetryTimestamp + + + unpauseAction + + + taskIdentifier + + + parent + + + waitingReason + + + stateBeforeSuspend + + + category + + + handlerUri + + + otherHandlersUriStack + + + channel + + + subtaskRef + + + dependentTaskRef + + + lastRunStartTimestamp + + + lastRunFinishTimestamp + + + completionTimestamp + + + + 910 + hidden + + + + + progress + + + expectedTotal + + + stalledSince + + + + + + + + + + safe + + "Safe" expression profile. It is supposed to contain only operations that are "safe", + i.e. operations that have very little risk to harm the system, circumvent midPoint security + and so on. Use of those operations should be reasonably safe in all expressions. + However, there are limitations. This profile may incomplete or it may even be not completely secure. + Proper security testing of this profile was not yet conducted. It is provided here "AS IS", + without any guarantees. Use at your own risk. + + deny + + asIs + allow + + + path + allow + + + value + allow + + + const + allow + + + script + deny + + + + + script-safe + deny + + com.evolveum.midpoint.xml.ns._public.common.common_3 + MidPoint common schema - generated bean classes + allow + + + com.evolveum.prism.xml.ns._public.types_3 + Prism schema - bean classes + allow + + + java.lang.Integer + allow + + + java.lang.Object + Basic Java operations. + deny + + equals + allow + + hashCode + allow + + + + java.lang.String + String operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.lang.CharSequence + allow + + + java.lang.Enum + allow + + + java.util.List + List operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.util.ArrayList + List operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.util.Map + allow + + + java.util.HashMap + allow + + + java.util.Date + allow + + + javax.xml.namespace.QName + allow + + + javax.xml.datatype.XMLGregorianCalendar + allow + + + java.lang.System + Just a few methods of System are safe enough. + deny + + currentTimeMillis + allow + + + + java.lang.IllegalStateException + Basic Java exception. Also used in test. + allow + + + java.lang.IllegalArgumentException + Basic Java exception. + allow + + + com.evolveum.midpoint.model.common.expression.functions.BasicExpressionFunctions + MidPoint basic functions library + allow + + + com.evolveum.midpoint.model.common.expression.functions.LogExpressionFunctions + MidPoint logging functions library + allow + + + com.evolveum.midpoint.report.impl.ReportFunctions + MidPoint report functions library + allow + + + org.apache.commons.lang.StringUtils + Apache Commons: Strings + allow + + + + + + + +
From f9debb27f82368f6c9ad0b2112cfdce03c56c619 Mon Sep 17 00:00:00 2001 From: Pavol Mederly Date: Mon, 6 Apr 2020 14:32:21 +0200 Subject: [PATCH 2/8] Stop visiting embedded objects by default Visitor in prism module did NOT visit objects embedded in references for a very long time. Recently we changed this behavior and started visiting embedded objects - in order to assure encryption of protected values in such objects (see 60328c40b2b99c6cf41ab6ce90145fae941d07bd). But this change broke other things, like resolution of references in ApprovalSchemaExecutionInformationType. Analysis of other uses indicate that visiting embedded objects can be wrong in other contexts as well. So now we are reverting to the old behavior and providing ConfigurableVisitor to allow controlling this feature. This resolves MID-6171. --- .../midpoint/common/crypto/CryptoUtil.java | 7 +++- .../midpoint/prism/ConfigurableVisitor.java | 34 +++++++++++++++++++ .../midpoint/prism/util/PrismAsserts.java | 2 -- .../prism/impl/PrismReferenceValueImpl.java | 2 +- .../midpoint/prism/PrismInternalTestUtil.java | 2 +- .../midpoint/prism/TestPrismParsing.java | 2 +- .../model/impl/ModelObjectResolver.java | 26 +++++++++++--- .../impl/controller/ModelController.java | 4 +-- .../wf/impl/AbstractWfTestPolicy.java | 6 ++-- .../midpoint/repo/common/ObjectResolver.java | 2 +- 10 files changed, 70 insertions(+), 17 deletions(-) create mode 100644 infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ConfigurableVisitor.java diff --git a/infra/common/src/main/java/com/evolveum/midpoint/common/crypto/CryptoUtil.java b/infra/common/src/main/java/com/evolveum/midpoint/common/crypto/CryptoUtil.java index 7e82a460b6c..55c624526e7 100644 --- a/infra/common/src/main/java/com/evolveum/midpoint/common/crypto/CryptoUtil.java +++ b/infra/common/src/main/java/com/evolveum/midpoint/common/crypto/CryptoUtil.java @@ -235,7 +235,7 @@ interface ProtectedStringProcessor { void apply(ProtectedStringType protectedString, String propertyName) throws EncryptionException; } - private static class CombinedVisitor implements Visitor, JaxbVisitor { + private static class CombinedVisitor implements ConfigurableVisitor, JaxbVisitor { private ProtectedStringProcessor processor; private String lastPropName = "?"; @@ -270,6 +270,11 @@ public void visit(Visitable visitable) { } } } + + @Override + public boolean shouldVisitEmbeddedObjects() { + return true; // Needed to encrypt secrets in embedded objects. See also 60328c40b2b99c6cf41ab6ce90145fae941d07bd. + } } @NotNull diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ConfigurableVisitor.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ConfigurableVisitor.java new file mode 100644 index 00000000000..edfb67e1377 --- /dev/null +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/ConfigurableVisitor.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020 Evolveum and contributors + * + * This work is dual-licensed under the Apache License 2.0 + * and European Union Public License. See LICENSE file for details. + */ + +package com.evolveum.midpoint.prism; + +import com.evolveum.midpoint.util.annotation.Experimental; + +/** + * Visitor with configurable behavior. + */ +@Experimental +public interface ConfigurableVisitor> extends Visitor { + + /** + * Should we visit also objects that are embedded in references? + */ + boolean shouldVisitEmbeddedObjects(); + + /** + * Helper method. + */ + static boolean shouldVisitEmbeddedObjects(Visitor visitor) { + //noinspection SimplifiableIfStatement + if (visitor instanceof ConfigurableVisitor) { + return ((ConfigurableVisitor) visitor).shouldVisitEmbeddedObjects(); + } else { + return false; // This is the behavior before 60328c40b2b99c6cf41ab6ce90145fae941d07bd (March 24th, 2020) + } + } +} diff --git a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/PrismAsserts.java b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/PrismAsserts.java index c53ab69d6ab..daf8d1b517d 100644 --- a/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/PrismAsserts.java +++ b/infra/prism-api/src/main/java/com/evolveum/midpoint/prism/util/PrismAsserts.java @@ -1257,7 +1257,6 @@ public static void assertEquivalent(String message, ItemP public static void assertImmutable(Definition definition) { definition.accept(def -> { - System.out.println("Checking " + def); if (!def.isImmutable()) { fail("Definition is not immutable: " + def); } @@ -1266,7 +1265,6 @@ public static void assertImmutable(Definition definition) { public static void assertMutable(Definition definition) { definition.accept(def -> { - System.out.println("Checking " + def); if (def.isImmutable()) { fail("Definition is not mutable: " + def); } diff --git a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceValueImpl.java b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceValueImpl.java index d1646392eff..92d04fd1e5f 100644 --- a/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceValueImpl.java +++ b/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismReferenceValueImpl.java @@ -714,7 +714,7 @@ public void shortDump(StringBuilder sb) { @Override public void accept(Visitor visitor) { super.accept(visitor); - if (object != null) { + if (object != null && ConfigurableVisitor.shouldVisitEmbeddedObjects(visitor)) { //noinspection unchecked object.accept(visitor); } diff --git a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/PrismInternalTestUtil.java b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/PrismInternalTestUtil.java index 8f737de9b6c..f9a049ec8ed 100644 --- a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/PrismInternalTestUtil.java +++ b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/PrismInternalTestUtil.java @@ -296,7 +296,7 @@ public static void assertUserJack(PrismObject user, boolean expectRawI user.assertDefinitions("test"); assertUserJackContent(user, expectRawInConstructions, expectFullPolyName, withIncomplete); assertUserJackExtension(user, withIncomplete); - assertVisitor(user, 75); + assertVisitor(user, 71); assertPathVisitor(user, UserType.F_ASSIGNMENT, true, 9); assertPathVisitor(user, ItemPath.create(UserType.F_ASSIGNMENT, USER_ASSIGNMENT_1_ID), true, 3); diff --git a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismParsing.java b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismParsing.java index 697e08d489f..3171fe04331 100644 --- a/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismParsing.java +++ b/infra/prism-impl/src/test/java/com/evolveum/midpoint/prism/TestPrismParsing.java @@ -390,7 +390,7 @@ protected void assertUserAdhoc(PrismObject user, boolean expectRawInCo user.checkConsistence(); assertUserJackContent(user, expectRawInConstructions, true, withIncomplete); assertUserExtensionAdhoc(user); - assertVisitor(user, 62); + assertVisitor(user, 58); } private void assertUserExtensionAdhoc(PrismObject user) { diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelObjectResolver.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelObjectResolver.java index 4efe6b7cb25..eb8efc7bbe3 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelObjectResolver.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelObjectResolver.java @@ -17,6 +17,7 @@ import com.evolveum.midpoint.schema.SearchResultList; import com.evolveum.midpoint.task.api.TaskManager; +import com.evolveum.midpoint.util.annotation.Experimental; import com.evolveum.midpoint.wf.api.WorkflowManager; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; @@ -325,13 +326,30 @@ public R searchOrgTreeWidthFirst(PrismObject object, return null; } + @Experimental @Override - public void resolveAllReferences(Collection pcvs, Object taskObject, OperationResult result) { + public void resolveAllReferences(Collection> pcvs, Object taskObject, OperationResult result) { Session session = openResolutionSession(null); Task task = (Task) taskObject; - Visitor visitor = (o) -> { - if (o instanceof PrismReferenceValue) { - resolveReference((PrismReferenceValue) o, "resolving object reference", session, task, result); + ConfigurableVisitor visitor = new ConfigurableVisitor() { + @Override + public boolean shouldVisitEmbeddedObjects() { + // This is to avoid endless recursion when resolving cases: A parent case has references to its children + // whereas child cases have references to their parent. We could deal with this using SmartVisitable + // but that would be overkill for the basic use - it would resolve much more than needed. So we simply stop + // visiting embedded objects because in the basic use case we are simply not interested in them. + // See also MID-6171. + // + // Should we need this feature we will add an option or create a separate method + // e.g. "resolveAllReferencesDeeply". + return false; + } + + @Override + public void visit(Visitable visitable) { + if (visitable instanceof PrismReferenceValue) { + resolveReference((PrismReferenceValue) visitable, "resolving object reference", session, task, result); + } } }; pcvs.forEach(pcv -> pcv.accept(visitor)); diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelController.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelController.java index 3a1052aceb4..d3e76428772 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelController.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelController.java @@ -2297,10 +2297,10 @@ private void computePolyStringVisit(Visitable visitable) { PolyString polyString = pval.getValue(); if (polyString.getOrig() == null) { String orig = localizationService.translate(polyString); - LOGGER.info("PPPP1: Filling out orig value of polyString {}: {}", polyString, orig); + LOGGER.trace("PPPP1: Filling out orig value of polyString {}: {}", polyString, orig); polyString.setComputedOrig(orig); polyString.recompute(prismContext.getDefaultPolyStringNormalizer()); - LOGGER.info("PPPP2: Resulting polyString: {}", polyString); + LOGGER.trace("PPPP2: Resulting polyString: {}", polyString); } } } diff --git a/model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/AbstractWfTestPolicy.java b/model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/AbstractWfTestPolicy.java index a420267eb2c..104a8b84c49 100644 --- a/model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/AbstractWfTestPolicy.java +++ b/model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/AbstractWfTestPolicy.java @@ -17,10 +17,7 @@ import static com.evolveum.midpoint.xml.ns._public.common.common_3.CaseWorkItemType.F_ORIGINAL_ASSIGNEE_REF; import java.io.File; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Comparator; -import java.util.List; +import java.util.*; import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -466,6 +463,7 @@ protected void afterFirstClockworkRun(CaseType rootCase, if (subcase.getApprovalContext() != null) { OperationResult opResult = new OperationResult("dummy"); ApprovalSchemaExecutionInformationType info = workflowManager.getApprovalSchemaExecutionInformation(subcase.getOid(), opTask, opResult); + modelObjectResolver.resolveAllReferences(Collections.singleton(info.asPrismContainerValue()), opTask, result); // MID-6171 display("Execution info for " + subcase, info); opResult.computeStatus(); assertSuccess("Unexpected problem when looking at getApprovalSchemaExecutionInformation result", opResult); diff --git a/repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/ObjectResolver.java b/repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/ObjectResolver.java index d644a4ebc7f..e776d70d485 100644 --- a/repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/ObjectResolver.java +++ b/repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/ObjectResolver.java @@ -73,7 +73,7 @@ SearchResultList> searchObjects(Class t // EXPERIMENTAL (implemented only for ModelObjectResolver) // TODO clean up this mess - default void resolveAllReferences(Collection pcvs, Object taskObject, OperationResult result) { + default void resolveAllReferences(Collection> pcvs, Object taskObject, OperationResult result) { throw new UnsupportedOperationException(); } From 457bdf7d5300ba8c90f3d409552c909fee47f2e7 Mon Sep 17 00:00:00 2001 From: lskublik Date: Mon, 6 Apr 2020 15:37:26 +0200 Subject: [PATCH 3/8] adding new class for redirecting to self profile page --- .../web/page/self/PageSelfProfile.java | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfProfile.java diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfProfile.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfProfile.java new file mode 100644 index 00000000000..0e8bcbff3e7 --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfProfile.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2010-2015 Evolveum and contributors + * + * This work is dual-licensed under the Apache License 2.0 + * and European Union Public License. See LICENSE file for details. + */ +package com.evolveum.midpoint.web.page.self; + +import org.apache.wicket.model.IModel; +import org.apache.wicket.model.Model; +import org.apache.wicket.request.mapper.parameter.PageParameters; + +import com.evolveum.midpoint.gui.api.GuiStyleConstants; +import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils; +import com.evolveum.midpoint.security.api.AuthorizationConstants; +import com.evolveum.midpoint.util.logging.Trace; +import com.evolveum.midpoint.util.logging.TraceManager; +import com.evolveum.midpoint.web.application.AuthorizationAction; +import com.evolveum.midpoint.web.application.PageDescriptor; +import com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb; +import com.evolveum.midpoint.web.page.admin.roles.PageRole; + +@PageDescriptor(url = {"/self/profile/role"}, action = { + @AuthorizationAction(actionUri = PageSelf.AUTH_SELF_ALL_URI, + label = PageSelf.AUTH_SELF_ALL_LABEL, + description = PageSelf.AUTH_SELF_ALL_DESCRIPTION), + @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SELF_PROFILE_URL, + label = "PageRoleSelfProfile.auth.profile.label", + description = "PageRoleSelfProfile.auth.profile.description")}) +public class PageSelfProfile extends PageRole { + + public PageSelfProfile() { + super(); + } + + public PageSelfProfile(PageParameters parameters) { + super(parameters); + } + + private static final long serialVersionUID = 1L; + private static final Trace LOGGER = TraceManager.getTrace(PageSelfProfile.class); + + @Override + protected String getObjectOidParameter() { + return WebModelServiceUtils.getLoggedInFocusOid(); + } + + @Override + protected boolean isSelfProfile(){ + return true; + } + + @Override + protected IModel createPageTitleModel() { + return createStringResource("PageAdmin.menu.profile"); + } + + @Override + protected void createBreadcrumb() { + super.createBreadcrumb(); + + Breadcrumb bc = getLastBreadcrumb(); + bc.setIcon(new Model(GuiStyleConstants.CLASS_OBJECT_ROLE_ICON)); + } + +} From 4548b96d886dad55fed56b6eff5aa3264ea23b44 Mon Sep 17 00:00:00 2001 From: lskublik Date: Mon, 6 Apr 2020 15:41:08 +0200 Subject: [PATCH 4/8] change back link in system configuration for dashboard link box MID-6174 --- .../web/page/self/PageSelfProfile.java | 37 ++++--------------- .../000-system-configuration.xml | 2 +- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfProfile.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfProfile.java index 0e8bcbff3e7..c7145f81cfe 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfProfile.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/self/PageSelfProfile.java @@ -6,6 +6,10 @@ */ package com.evolveum.midpoint.web.page.self; +import com.evolveum.midpoint.gui.api.page.PageBase; + +import com.evolveum.midpoint.gui.api.util.WebComponentUtil; + import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import org.apache.wicket.request.mapper.parameter.PageParameters; @@ -20,47 +24,22 @@ import com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb; import com.evolveum.midpoint.web.page.admin.roles.PageRole; -@PageDescriptor(url = {"/self/profile/role"}, action = { +@PageDescriptor(url = {"/self/profile"}, action = { @AuthorizationAction(actionUri = PageSelf.AUTH_SELF_ALL_URI, label = PageSelf.AUTH_SELF_ALL_LABEL, description = PageSelf.AUTH_SELF_ALL_DESCRIPTION), @AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SELF_PROFILE_URL, label = "PageRoleSelfProfile.auth.profile.label", description = "PageRoleSelfProfile.auth.profile.description")}) -public class PageSelfProfile extends PageRole { +public class PageSelfProfile extends PageBase { public PageSelfProfile() { - super(); + getRequestCycle().setResponsePage(WebComponentUtil.resolveSelfPage()); } public PageSelfProfile(PageParameters parameters) { super(parameters); - } - - private static final long serialVersionUID = 1L; - private static final Trace LOGGER = TraceManager.getTrace(PageSelfProfile.class); - - @Override - protected String getObjectOidParameter() { - return WebModelServiceUtils.getLoggedInFocusOid(); - } - - @Override - protected boolean isSelfProfile(){ - return true; - } - - @Override - protected IModel createPageTitleModel() { - return createStringResource("PageAdmin.menu.profile"); - } - - @Override - protected void createBreadcrumb() { - super.createBreadcrumb(); - - Breadcrumb bc = getLastBreadcrumb(); - bc.setIcon(new Model(GuiStyleConstants.CLASS_OBJECT_ROLE_ICON)); + getRequestCycle().setResponsePage(WebComponentUtil.resolveSelfPage()); } } diff --git a/gui/admin-gui/src/main/resources/initial-objects/000-system-configuration.xml b/gui/admin-gui/src/main/resources/initial-objects/000-system-configuration.xml index bf47e85552c..868c722b759 100644 --- a/gui/admin-gui/src/main/resources/initial-objects/000-system-configuration.xml +++ b/gui/admin-gui/src/main/resources/initial-objects/000-system-configuration.xml @@ -172,7 +172,7 @@ - /self/profile/user + /self/profile View/edit your profile From 382edd6287ffddc05fc336ebbcd4fcef0e4bc5cf Mon Sep 17 00:00:00 2001 From: Katarina Valalikova Date: Mon, 6 Apr 2020 16:31:19 +0200 Subject: [PATCH 5/8] changing assignmentRelationApproach into assignmentHolderRelationApproach. and later assignmentTargetRelationApproach can come. --- .../src/main/resources/xml/ns/public/common/common-core-3.xsd | 2 +- .../model/impl/controller/ModelInteractionServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd b/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd index 2282242d72e..4ceaf55d4e1 100755 --- a/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd +++ b/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd @@ -15025,7 +15025,7 @@ - +

diff --git a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java index 9347be64bce..ab98af98097 100644 --- a/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java +++ b/model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java @@ -1790,7 +1790,7 @@ private AssignmentCandidatesSpecification determineArchetypeAssignmentCandidateS } spec.setAssignmentObjectRelations(assignmentHolderRelations); spec.setSupportGenericAssignment(archetypePolicy == null - || AssignmentRelationApproachType.CLOSED != archetypePolicy.getAssignmentRelationApproach()); + || AssignmentRelationApproachType.CLOSED != archetypePolicy.getAssignmentHolderRelationApproach()); return spec; } From 1931ca0bb819c3193865c56eb970025af84a3713 Mon Sep 17 00:00:00 2001 From: Radovan Semancik Date: Mon, 6 Apr 2020 17:26:32 +0200 Subject: [PATCH 6/8] Improving assignmentHolderRelationApproach schemadoc --- .../xml/ns/public/common/common-core-3.xsd | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd b/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd index 4ceaf55d4e1..b066782c249 100755 --- a/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd +++ b/infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd @@ -15029,8 +15029,8 @@

- Configures overall assignmentRelation approach for archetypes objects. This essentially means - that is allows or disables the use of "generic" assignments for archetyped objects. + Configures overall assignmentRelation approach for archetyped objects (assignment holders). + This essentially means that is allows or disables the use of "generic" assignments for archetyped objects. If the generic assignments are allowed (open approach), the archetyped object can be a holder of any assignment that targets any assignable type with any relation (Note: this is still subject to authorizations). @@ -15039,10 +15039,18 @@ If this property is set to "closed" then GUI will not render that button. In that case only those assignments that are explicitly allowed by assignmentRelation statements are possible.

+

+ This setting controls behavior of midPoint user interface. + E.g. setting the approach to "closed" will hide the button that controls generic assignment in user's the "Assignments" tab. + But it will not disable similar button in the "Members" tab of the role. + This setting is only about controlling uni-directional behavior of GUI. + It does not constraint the entire assignment model. + That will be too complex to implement (at least for now). +

4.1 - ArchetypePolicyType.assignmentRelationApproach + ArchetypePolicyType.assignmentHolderRelationApproach
From 13826a1926f32de461910e0cd55bd3ebf028cf1f Mon Sep 17 00:00:00 2001 From: Katarina Valalikova Date: Mon, 6 Apr 2020 17:58:58 +0200 Subject: [PATCH 7/8] show/hide improvement for task basic tab, making executeScript panel smaller, adding objectDelta panel --- .../factory/ExecuteScriptWrapperFactory.java | 2 +- .../gui/impl/factory/ObjectDeltaModel.java | 67 +++++++++++++++++++ .../impl/factory/ObjectDeltaPanelFactory.java | 44 ++++++++++++ .../page/admin/server/TaskBasicTabPanel.java | 23 +++++++ .../schema/constants/SchemaConstants.java | 1 + 5 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ObjectDeltaModel.java create mode 100644 gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ObjectDeltaPanelFactory.java diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ExecuteScriptWrapperFactory.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ExecuteScriptWrapperFactory.java index f6c6419ad2a..f525a556bd2 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ExecuteScriptWrapperFactory.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ExecuteScriptWrapperFactory.java @@ -39,6 +39,6 @@ public Integer getOrder() { @Override protected Panel getPanel(PrismPropertyPanelContext panelCtx) { - return new TextAreaPanel<>(panelCtx.getComponentId(), new ExecuteScriptModel(panelCtx.getRealValueModel(), panelCtx.getPageBase()), 100); + return new TextAreaPanel<>(panelCtx.getComponentId(), new ExecuteScriptModel(panelCtx.getRealValueModel(), panelCtx.getPageBase()), 20); } } diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ObjectDeltaModel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ObjectDeltaModel.java new file mode 100644 index 00000000000..85bc5f59646 --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ObjectDeltaModel.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2020 Evolveum and contributors + * + * This work is dual-licensed under the Apache License 2.0 + * and European Union Public License. See LICENSE file for details. + */ + +package com.evolveum.midpoint.gui.impl.factory; + +import com.evolveum.prism.xml.ns._public.types_3.ObjectDeltaType; + +import org.apache.commons.lang3.StringUtils; +import org.apache.wicket.ThreadContext; +import org.apache.wicket.model.IModel; + +import com.evolveum.midpoint.gui.api.util.ModelServiceLocator; +import com.evolveum.midpoint.util.logging.LoggingUtils; +import com.evolveum.midpoint.util.logging.Trace; +import com.evolveum.midpoint.util.logging.TraceManager; +import com.evolveum.midpoint.xml.ns._public.model.scripting_3.ExecuteScriptType; + +public class ObjectDeltaModel implements IModel { + + private static final transient Trace LOGGER = TraceManager.getTrace(ObjectDeltaModel.class); + + private IModel baseModel; + private ModelServiceLocator locator; + + public ObjectDeltaModel(IModel model, ModelServiceLocator locator) { + this.baseModel = model; + this.locator = locator; + } + + + @Override + public String getObject() { + try { + ObjectDeltaType value = baseModel.getObject(); + if (value == null) { + return null; + } + + return locator.getPrismContext().xmlSerializer().serializeRealValue(value); + } catch (Exception e) { + // TODO handle!!!! + LoggingUtils.logUnexpectedException(LOGGER, "Cannot serialize delta", e); + ThreadContext.getSession().error("Cannot serialize delta: " + e.getMessage()); + } + return null; + } + + @Override + public void setObject(String object) { + if (StringUtils.isBlank(object)) { + return; + } + + try { + ObjectDeltaType script = locator.getPrismContext().parserFor(object).parseRealValue(ObjectDeltaType.class); + baseModel.setObject(script); + } catch (Exception e) { + // TODO handle!!!! + LoggingUtils.logUnexpectedException(LOGGER, "Cannot parse delta", e); + ThreadContext.getSession().error("Cannot parse delta: " + e.getMessage()); + } + } +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ObjectDeltaPanelFactory.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ObjectDeltaPanelFactory.java new file mode 100644 index 00000000000..8139d3e779c --- /dev/null +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/ObjectDeltaPanelFactory.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2020 Evolveum and contributors + * + * This work is dual-licensed under the Apache License 2.0 + * and European Union Public License. See LICENSE file for details. + */ + +package com.evolveum.midpoint.gui.impl.factory; + +import javax.annotation.PostConstruct; + +import com.evolveum.midpoint.web.component.input.TextAreaPanel; + +import org.apache.wicket.markup.html.panel.Panel; +import org.springframework.stereotype.Component; + +import com.evolveum.midpoint.gui.api.factory.AbstractGuiComponentFactory; +import com.evolveum.midpoint.gui.api.prism.ItemWrapper; +import com.evolveum.midpoint.util.QNameUtil; +import com.evolveum.prism.xml.ns._public.types_3.ObjectDeltaType; + +@Component +public class ObjectDeltaPanelFactory extends AbstractGuiComponentFactory { + + @PostConstruct + public void register() { + getRegistry().addToRegistry(this); + } + + @Override + public Integer getOrder() { + return super.getOrder() - 100; + } + + @Override + protected Panel getPanel(PrismPropertyPanelContext panelCtx) { + return new TextAreaPanel<>(panelCtx.getComponentId(), new ObjectDeltaModel(panelCtx.getRealValueModel(), panelCtx.getPageBase()), 20); + } + + @Override + public boolean match(IW wrapper) { + return QNameUtil.match(ObjectDeltaType.COMPLEX_TYPE, wrapper.getTypeName()); + } +} diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/TaskBasicTabPanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/TaskBasicTabPanel.java index 0dff1748ffb..7dd3c604d63 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/TaskBasicTabPanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/TaskBasicTabPanel.java @@ -173,6 +173,29 @@ private ItemVisibility getBasicTabVisibility(ItemPath path) { return ItemVisibility.HIDDEN; } + // region no panel for type + if (ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_SEARCH_OPTIONS).equivalent(path)) { + return ItemVisibility.HIDDEN; + } + + if (ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_EXECUTE_OPTIONS).equivalent(path)) { + return ItemVisibility.HIDDEN; + } + + if (ItemPath.create(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_MODEL_EXECUTE_OPTIONS).equivalent(path)) { + return ItemVisibility.HIDDEN; + } + + if (TaskType.F_RESULT.equivalent(path)) { + return ItemVisibility.HIDDEN; + } + + if (TaskType.F_OTHER_HANDLERS_URI_STACK.equivalent(path)) { + return ItemVisibility.HIDDEN; + } + + //end region unsupported panel for type + String taskHandler = getTask().getHandlerUri(); if (taskHandler == null) { diff --git a/infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/SchemaConstants.java b/infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/SchemaConstants.java index 5f32b88a2d9..e08ab9b46c0 100644 --- a/infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/SchemaConstants.java +++ b/infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/SchemaConstants.java @@ -357,6 +357,7 @@ public abstract class SchemaConstants { public static final ItemName MODEL_EXTENSION_WORKER_THREADS = new ItemName(NS_MODEL_EXTENSION, "workerThreads"); public static final ItemName MODEL_EXTENSION_OPTION_RAW = new ItemName(NS_MODEL_EXTENSION, "optionRaw"); public static final ItemName MODEL_EXTENSION_EXECUTE_OPTIONS = new ItemName(NS_MODEL_EXTENSION, "executeOptions"); + public static final ItemName MODEL_EXTENSION_MODEL_EXECUTE_OPTIONS = new ItemName(NS_MODEL_EXTENSION, "modelExecuteOptions"); public static final ItemName MODEL_EXTENSION_DIAGNOSE = new ItemName(NS_MODEL_EXTENSION, "diagnose"); public static final ItemName MODEL_EXTENSION_FIX = new ItemName(NS_MODEL_EXTENSION, "fix"); From fcde18a4cb60f9ca151e52ec4ac17f69fddf423d Mon Sep 17 00:00:00 2001 From: Katarina Valalikova Date: Mon, 6 Apr 2020 18:35:54 +0200 Subject: [PATCH 8/8] fixing MID-6170, sorting works again + cleanup --- .../midpoint/gui/impl/prism/PrismContainerValuePanel.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/prism/PrismContainerValuePanel.java b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/prism/PrismContainerValuePanel.java index 1f63eee3afc..cf4aca78edb 100644 --- a/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/prism/PrismContainerValuePanel.java +++ b/gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/prism/PrismContainerValuePanel.java @@ -186,7 +186,6 @@ protected void populateItem(final ListItem item) { populateNonContainer(item); } }; - properties.setReuseItems(true); properties.setOutputMarkupId(true); add(propertiesLabel); propertiesLabel.add(properties); @@ -355,13 +354,8 @@ public boolean isVisible() { private void populateContainer(ListItem> container) { PrismContainerWrapper itemWrapper = container.getModelObject(); try { -// ItemPanelSettingsBuilder builder = new ItemPanelSettingsBuilder().visibilityHandler(getVisibilityHandler()); Panel panel = getPageBase().initItemPanel("container", itemWrapper.getTypeName(), container.getModel(), settings); panel.setOutputMarkupId(true); -// panel.add(new VisibleBehaviour(() -> { -// CVW parent = PrismContainerValuePanel.this.getModelObject(); -// return container.getModelObject().isVisible(parent, visibilityHandler); -// })); container.add(panel); } catch (SchemaException e) { throw new SystemException("Cannot instantiate panel for: " + itemWrapper.getDisplayName());