[midPoint-git] [Evolveum/midpoint] 49b772: Switch expression profile on library function call

mederly noreply at github.com
Thu Aug 10 20:01:02 CEST 2023


  Branch: refs/heads/master
  Home:   https://github.com/Evolveum/midpoint
  Commit: 49b772cf9e6484c25da1e7d69a3156ea9844f8e6
      https://github.com/Evolveum/midpoint/commit/49b772cf9e6484c25da1e7d69a3156ea9844f8e6
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/expression/ExpressionEvaluatorProfile.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/ScriptingProfile.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/task/work/ObjectSetUtil.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/task/work/WorkDefinitionUtil.java
    M model/authentication-impl/src/main/java/com/evolveum/midpoint/authentication/impl/authorization/evaluator/MidPointGuiAuthorizationEvaluator.java
    A model/model-api/src/main/java/com/evolveum/midpoint/model/api/ActivityCustomization.java
    M model/model-api/src/main/java/com/evolveum/midpoint/model/api/ModelInteractionService.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/evaluator/FunctionExpressionEvaluator.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/evaluator/transformation/CombinatorialEvaluation.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/functions/FunctionLibrary.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/functions/FunctionLibraryManager.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/functions/LibraryFunctionExecutor.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/util/PopulatorUtil.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/tasks/ActivityExecutor.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestExpressionProfiles.java
    A model/model-intest/src/test/resources/profiles/archetype-little-trusted-role.xml
    M model/model-intest/src/test/resources/profiles/archetype-restricted-role.xml
    A model/model-intest/src/test/resources/profiles/archetype-trusted-role.xml
    A model/model-intest/src/test/resources/profiles/function-library-one.xml
    M model/model-intest/src/test/resources/profiles/role-scripting.xml
    A model/model-intest/src/test/resources/profiles/scripting-execute-simpleTrustedFunction.xml
    A model/model-intest/src/test/resources/profiles/scripting-script-in-unassign-filter.xml
    M model/model-intest/src/test/resources/profiles/system-configuration.xml
    M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/expression/Expression.java
    M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/expression/ExpressionEvaluationContext.java
    M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/expression/ExpressionUtil.java
    A repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/RunFlag.java
    M repo/security-api/src/main/java/com/evolveum/midpoint/security/api/SecurityContextManager.java
    M repo/security-api/src/main/java/com/evolveum/midpoint/security/api/SecurityUtil.java
    M repo/security-impl/src/main/java/com/evolveum/midpoint/security/impl/SecurityContextManagerImpl.java
    A testing/story/src/test/java/com/evolveum/midpoint/testing/story/TestTrustedScripts.java
    A testing/story/src/test/resources/trusted-scripts/archetype-little-trusted-task.xml
    A testing/story/src/test/resources/trusted-scripts/archetype-trusted-task.xml
    A testing/story/src/test/resources/trusted-scripts/function-library-one.xml
    A testing/story/src/test/resources/trusted-scripts/role-unprivileged.xml
    A testing/story/src/test/resources/trusted-scripts/system-configuration.xml
    A testing/story/src/test/resources/trusted-scripts/task-template-scripting-little-trusted.xml
    A testing/story/src/test/resources/trusted-scripts/task-template-scripting-no-profile.xml
    A testing/story/src/test/resources/trusted-scripts/task-template-scripting-trusted.xml
    A testing/story/src/test/resources/trusted-scripts/user-joe.xml
    M testing/story/testng-integration.xml

  Log Message:
  -----------
  Switch expression profile on library function call

When a library function is called, the expression profile is determined
anew for the function; the caller's profile is NOT used. This allows
for calling trusted functions from untrusted (or little-trusted) code.

Also created activity-aware submitTaskFromTemplate method
(in ModelInteractionService) and adapted WebComponentUtil to use it.

Work in progress. Related to MID-6913.


  Commit: c3d02fa6756522be74583dc0774caff923731bff
      https://github.com/Evolveum/midpoint/commit/c3d02fa6756522be74583dc0774caff923731bff
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/util/WebComponentUtil.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/expression/ExpressionEvaluatorProfile.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/ScriptingProfile.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/task/work/ObjectSetUtil.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/task/work/WorkDefinitionUtil.java
    M model/authentication-impl/src/main/java/com/evolveum/midpoint/authentication/impl/authorization/evaluator/MidPointGuiAuthorizationEvaluator.java
    A model/model-api/src/main/java/com/evolveum/midpoint/model/api/ActivityCustomization.java
    M model/model-api/src/main/java/com/evolveum/midpoint/model/api/ModelInteractionService.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/evaluator/FunctionExpressionEvaluator.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/evaluator/transformation/CombinatorialEvaluation.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/functions/FunctionLibrary.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/functions/FunctionLibraryManager.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/expression/functions/LibraryFunctionExecutor.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/util/PopulatorUtil.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/ModelInteractionServiceImpl.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/controller/tasks/ActivityExecutor.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestExpressionProfiles.java
    A model/model-intest/src/test/resources/profiles/archetype-little-trusted-role.xml
    M model/model-intest/src/test/resources/profiles/archetype-restricted-role.xml
    A model/model-intest/src/test/resources/profiles/archetype-trusted-role.xml
    A model/model-intest/src/test/resources/profiles/function-library-one.xml
    M model/model-intest/src/test/resources/profiles/role-scripting.xml
    A model/model-intest/src/test/resources/profiles/scripting-execute-simpleTrustedFunction.xml
    A model/model-intest/src/test/resources/profiles/scripting-script-in-unassign-filter.xml
    M model/model-intest/src/test/resources/profiles/system-configuration.xml
    M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/expression/Expression.java
    M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/expression/ExpressionEvaluationContext.java
    M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/expression/ExpressionUtil.java
    A repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/RunFlag.java
    M repo/security-api/src/main/java/com/evolveum/midpoint/security/api/SecurityContextManager.java
    M repo/security-api/src/main/java/com/evolveum/midpoint/security/api/SecurityUtil.java
    M repo/security-impl/src/main/java/com/evolveum/midpoint/security/impl/SecurityContextManagerImpl.java
    A testing/story/src/test/java/com/evolveum/midpoint/testing/story/TestTrustedScripts.java
    A testing/story/src/test/resources/trusted-scripts/archetype-little-trusted-task.xml
    A testing/story/src/test/resources/trusted-scripts/archetype-trusted-task.xml
    A testing/story/src/test/resources/trusted-scripts/function-library-one.xml
    A testing/story/src/test/resources/trusted-scripts/role-unprivileged.xml
    A testing/story/src/test/resources/trusted-scripts/system-configuration.xml
    A testing/story/src/test/resources/trusted-scripts/task-template-scripting-little-trusted.xml
    A testing/story/src/test/resources/trusted-scripts/task-template-scripting-no-profile.xml
    A testing/story/src/test/resources/trusted-scripts/task-template-scripting-trusted.xml
    A testing/story/src/test/resources/trusted-scripts/user-joe.xml
    M testing/story/testng-integration.xml

  Log Message:
  -----------
  Merge branch 'tmp/mid-6913'


Compare: https://github.com/Evolveum/midpoint/compare/46d807fc6595...c3d02fa67565


More information about the midPoint-svn mailing list