[midPoint-git] [Evolveum/midpoint] 3f7114: Check profiles for bulk actions and notifications
mederly
noreply at github.com
Tue Aug 8 15:49:00 CEST 2023
Branch: refs/heads/master
Home: https://github.com/Evolveum/midpoint
Commit: 3f7114b02482de75510b15b2e0d46f31626e57e4
https://github.com/Evolveum/midpoint/commit/3f7114b02482de75510b15b2e0d46f31626e57e4
Author: Pavol Mederly <mederly at evolveum.com>
Date: 2023-08-08 (Tue, 08 Aug 2023)
Changed paths:
M infra/schema/src/main/java/com/evolveum/midpoint/schema/config/ConfigurationItemOrigin.java
A infra/schema/src/main/java/com/evolveum/midpoint/schema/config/EventHandlerConfigItem.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/constants/SchemaConstants.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/expression/ExpressionEvaluatorsProfile.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/expression/ExpressionProfile.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/expression/FunctionLibrariesProfile.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/expression/ScriptingProfile.java
M infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd
M model/cases-impl/src/main/java/com/evolveum/midpoint/cases/impl/helpers/NotificationHelper.java
M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/ExpressionProfileManager.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/MidpointFunctionsImpl.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/ExecutionContext.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/ScriptingExpressionEvaluator.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/VariablesUtil.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/actions/BaseActionExecutor.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/actions/EvaluateExpressionExecutor.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/actions/ExecuteScriptExecutor.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/actions/NotifyExecutor.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/actions/UnassignExecutor.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/expressions/SearchEvaluator.java
M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestExpressionProfiles.java
M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestNotifications.java
M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/scripting/AbstractBasicScriptingTest.java
A model/model-intest/src/test/resources/profiles/role-scripting.xml
A model/model-intest/src/test/resources/profiles/scripting-execute-script.xml
A model/model-intest/src/test/resources/profiles/scripting-expression-execute-script.xml
A model/model-intest/src/test/resources/profiles/scripting-notification-custom-handler.xml
A model/model-intest/src/test/resources/profiles/scripting-script-in-query.xml
A model/model-intest/src/test/resources/profiles/user-joe.xml
M model/model-test/src/main/java/com/evolveum/midpoint/model/test/DummyTransport.java
M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/EventHandler.java
A model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/EventProcessingContext.java
M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/NotificationManager.java
M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/Event.java
M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/factory/CustomEventFactory.java
A model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/transports/SendingContext.java
M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/transports/Transport.java
M model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/transports/TransportService.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/CaseEventCreationListenerImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/EventHandlerRegistry.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationManagerImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/BaseEventImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/CaseEventImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/CaseManagementEventImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/CustomEventImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkItemAllocationEventImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkItemCustomEventImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkItemEventImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/WorkItemLifecycleEventImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/factory/CustomEventFactoryImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/handlers/AggregatedEventHandler.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/handlers/BaseHandler.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/BaseNotificationHelper.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/CategoryFilterHelper.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/ExpressionFilterHelper.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/FocusTypeFilterHelper.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/KindIntentFilterHelper.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/NotificationExpressionHelper.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/OperationFilterHelper.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/helpers/StatusFilterHelper.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractGeneralNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AbstractPolicyRuleNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AccountActivationNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/AccountPasswordNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/ConfirmationNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/CustomNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/GeneralNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/PasswordResetNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/RegistrationConfirmationNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleCampaignNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleCampaignStageNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleCaseManagementNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleFocalObjectNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimplePolicyRuleNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleReportNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleResourceObjectNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleReviewerNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleTaskNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/SimpleUserNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/TimeValidityNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/notifiers/UserPasswordNotifier.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/util/EventHelper.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/CustomMessageTransport.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/FileMessageTransport.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/MailMessageTransport.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/SmsMessageTransport.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/TransportServiceImpl.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/TransportUtil.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/legacy/LegacyCustomTransport.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/legacy/LegacyFileTransport.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/legacy/LegacyMailTransport.java
M model/notifications-impl/src/main/java/com/evolveum/midpoint/transport/impl/legacy/LegacySimpleSmsTransport.java
M model/notifications-impl/src/test/java/com/evolveum/midpoint/notifications/impl/NotificationsTest.java
M model/notifications-impl/src/test/java/com/evolveum/midpoint/notifications/impl/TestMessageTransport.java
M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/ProvisioningContext.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/query/SelectorToFilterTranslator.java
Log Message:
-----------
Check profiles for bulk actions and notifications
1. Scripting service now establishes the expression profile based on
the origin of the script (bulk action) and enforces it.
Hence, the "am I root?" checks for "execute-script",
"evaluate-expression" and "notify" action (having custom notifier)
are now gone. They are replaced by the default profile for bulks,
which is either "full" (for #all autz holder) or "limited" (otherwise).
2. Notifications module now has a rudimentary support for expression
profiles: As for custom notifiers, it requires a caller to provide
explicit expression profile for their execution. (This is used e.g.
from the bulk actions.) Other notifiers run currently under "full"
profile; we may add the profiles for e.g. message template objects
later.
The ad-hoc handler object was removed from Event, and should now be
provided as a parameter to the NotificationManager#processEvent instead.
Internal APIs/SPIs in the module were adapted:
ConfigurationItem, EventProcessingContext and SendingContext objects
are now universally used.
Work in progress:
- Custom case notifications use "full" profile for now.
- Default profiles for bulks/notifications from the system config
are not applied.
- Final review of the use of profiles in bulk actions and custom
notifications should be done.
- Some tests still fail.
- Not everything for MID-6913/MID-7831 is implemented, although we
are drawing nearer.
Commit: 1ddcadbe0d64a90c66d89343ff25dda08c0a733d
https://github.com/Evolveum/midpoint/commit/1ddcadbe0d64a90c66d89343ff25dda08c0a733d
Author: Pavol Mederly <mederly at evolveum.com>
Date: 2023-08-08 (Tue, 08 Aug 2023)
Changed paths:
A infra/schema/src/main/java/com/evolveum/midpoint/schema/error/ErrorStackDumper.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/result/OperationResult.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ExceptionUtil.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/PolicyRuleEvaluator.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/PolicyRuleProcessor.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/util/ModelImplUtils.java
Log Message:
-----------
Fix double evaluation of policy rules
The recently introduced checks for double evaluation of policy rules
revealed that it occurs when a focus is being deleted. This commit fixes
that.
This should fix failing TestLinkedObjects.
Also, introducing highly experimental "logical stack trace" that uses
OperationResult objects to provide a context of an error meaningful
to the engineer.
Commit: bd064dedb19e3aa31dca9d40a313ee2a20b9bc2a
https://github.com/Evolveum/midpoint/commit/bd064dedb19e3aa31dca9d40a313ee2a20b9bc2a
Author: Pavol Mederly <mederly at evolveum.com>
Date: 2023-08-08 (Tue, 08 Aug 2023)
Changed paths:
M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/cases/CaseTriggeringUtil.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedPolicyRuleImpl.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/evaluators/StateConstraintEvaluator.java
Log Message:
-----------
Fix origin for "state" scripts in policy rules
This fixes failing TestPolicyRules2.
Commit: fb0556893027ac56ffd91282baf9767a6c7ae60c
https://github.com/Evolveum/midpoint/commit/fb0556893027ac56ffd91282baf9767a6c7ae60c
Author: Pavol Mederly <mederly at evolveum.com>
Date: 2023-08-08 (Tue, 08 Aug 2023)
Changed paths:
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/AssignmentPopup.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/MultiTypesMemberPopupTabPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/TypedAssignablePanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/objecttypeselect/ObjectTypeSelectPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/path/ItemPathPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/wizard/BasicWizardStepPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/page/PageBase.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/ObjectTypeListUtil.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/data/column/LifecycleStateColumn.java
R gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/data/column/SimulationModeColumn.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/data/provider/ResourceTemplateProvider.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/input/expression/ScriptExpressionPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/search/SearchBoxConfigurationBuilder.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/search/panel/ReferenceValueSearchPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/search/panel/ReferenceValueSearchPopupPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/search/wrapper/ProcessedObjectTypeSearchItemWrapper.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/wizard/AbstractWizardBasicPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/panel/DropDownChoicePanelFactory.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/org/component/OrgMemberPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/ResourceSchemaHandlingPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/ResourceWizardPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/basic/BasicResourceWizardPanel.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/basic/CreateResourceChoiceTemplatePanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/basic/CreateResourceTemplatePanel.html
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/basic/CreateResourceTemplatePanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/basic/ResourceTemplate.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/objectType/associations/AssociationsTable.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/objectType/attributeMapping/AttributeMappingsTable.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/objectType/attributeMapping/MappingOverrideTable.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/admin/resource/component/wizard/objectType/synchronization/SynchronizationReactionTable.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/dialog/ChooseFocusTypeAndRelationDialogPanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/form/ValueChoosePanel.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/configuration/PageAuthorizationPlayground.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/configuration/PageRepositoryQuery.html
M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/configuration/PageRepositoryQuery.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/configuration/component/QueryConverterPanel.html
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/configuration/component/QueryConverterPanel.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/configuration/component/QueryPlaygroundPanel.html
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/configuration/component/QueryPlaygroundPanel.java
A gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/configuration/dto/QueryDto.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/configuration/dto/RepoQueryDto.java
M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/shadows/ShadowTablePanel.java
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/ObjectType_AllObjectsInASubtree.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/ObjectType_AllObjectsInAnOrg.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/OrgType_AllRootOrgs.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/OrgType_OrgOfType1.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/ShadowType_ShadowsOnGivenResource.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/UserType_First10UsersStartingWithA.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/UserType_SpecifiedCostCenters.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/UserType_UsersContainingJack.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/UserType_UsersNamedJack.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/UserType_UsersStartingWithA.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/UserType_UsersThatHaveARole.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/UserType_UsersThatHaveAssignedRole.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/UserType_UsersWithAGivenMailDomain.xml.data
M gui/admin-gui/src/main/resources/com/evolveum/midpoint/web/page/admin/configuration/query-samples/UserType_UsersWithShadowOnGivenResource.xml.data
A infra/schema/src/main/java/com/evolveum/midpoint/schema/query/AbstractTypedQuery.java
A infra/schema/src/main/java/com/evolveum/midpoint/schema/query/PreparedQuery.java
A infra/schema/src/main/java/com/evolveum/midpoint/schema/query/TypedQuery.java
M infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd
M model/model-api/src/main/java/com/evolveum/midpoint/model/api/ModelService.java
M model/model-api/src/main/java/com/evolveum/midpoint/model/api/expr/MidpointFunctions.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/MidpointFunctionsImpl.java
A model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/expr/TestQueryExpression.java
M model/model-impl/testng-unit.xml
Log Message:
-----------
Merge branch 'master' into feature/mid-6913
Compare: https://github.com/Evolveum/midpoint/compare/af9fe9ce0a4f...fb0556893027
More information about the midPoint-svn
mailing list