Skip to content

Commit

Permalink
Merge branch 'master' into feature/role-mining
Browse files Browse the repository at this point in the history
  • Loading branch information
tchrapovic committed Jul 5, 2023
2 parents 621f961 + 8ad0a8a commit a9ccf90
Show file tree
Hide file tree
Showing 702 changed files with 21,945 additions and 10,329 deletions.
2 changes: 2 additions & 0 deletions config/sql/native-new/postgres-new-audit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,6 @@ limit 50;

-- Initializing the last change number used in postgres-new-upgrade.sql.
-- This is important to avoid applying any change more than once.
-- Also update SqaleUtils.CURRENT_SCHEMA_AUDIT_CHANGE_NUMBER
-- repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/SqaleUtils.java
call apply_audit_change(4, $$ SELECT 1 $$, true);
2 changes: 2 additions & 0 deletions config/sql/native-new/postgres-new-upgrade-audit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,5 @@ $aa$);
-- WRITE CHANGES ABOVE ^^
-- IMPORTANT: update apply_audit_change number at the end of postgres-new-audit.sql
-- to match the number used in the last change here!
-- Also update SqaleUtils.CURRENT_SCHEMA_AUDIT_CHANGE_NUMBER
-- repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/SqaleUtils.java
2 changes: 2 additions & 0 deletions config/sql/native-new/postgres-new-upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -326,3 +326,5 @@ $aa$);
-- WRITE CHANGES ABOVE ^^
-- IMPORTANT: update apply_change number at the end of postgres-new.sql
-- to match the number used in the last change here!
-- Also update SqaleUtils.CURRENT_SCHEMA_CHANGE_NUMBER
-- repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/SqaleUtils.java
2 changes: 2 additions & 0 deletions config/sql/native-new/postgres-new.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2151,4 +2151,6 @@ END $$;

-- Initializing the last change number used in postgres-new-upgrade.sql.
-- This is important to avoid applying any change more than once.
-- Also update SqaleUtils.CURRENT_SCHEMA_CHANGE_NUMBER
-- repo/repo-sqale/src/main/java/com/evolveum/midpoint/repo/sqale/SqaleUtils.java
call apply_change(15, $$ SELECT 1 $$, true);
19 changes: 12 additions & 7 deletions gui/admin-gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 4 additions & 90 deletions gui/admin-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,32 +118,14 @@
<dependency>
<groupId>com.evolveum.commons</groupId>
<artifactId>util</artifactId>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.evolveum.prism</groupId>
<artifactId>prism-api</artifactId>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.evolveum.prism</groupId>
<artifactId>prism-impl</artifactId>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand All @@ -160,12 +142,6 @@
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>repo-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.model</groupId>
Expand All @@ -186,12 +162,6 @@
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>model-common</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
Expand Down Expand Up @@ -235,12 +205,6 @@
<artifactId>repo-sql-impl</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
Expand All @@ -258,12 +222,6 @@
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>rest-impl</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -340,12 +298,6 @@
<artifactId>provisioning-impl</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.provisioning</groupId>
Expand All @@ -358,12 +310,6 @@
<artifactId>report-impl</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.model</groupId>
Expand Down Expand Up @@ -430,18 +376,6 @@
<artifactId>wicket-request</artifactId>
</dependency>

<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-commons-fileupload</artifactId>
<version>${wicket.version}</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-ioc</artifactId>
Expand All @@ -455,12 +389,6 @@
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-util</artifactId>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
Expand Down Expand Up @@ -502,6 +430,10 @@
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
Expand Down Expand Up @@ -615,24 +547,12 @@
<groupId>com.evolveum.midpoint.infra</groupId>
<artifactId>test-util</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>repo-test-util</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
Expand Down Expand Up @@ -708,12 +628,6 @@
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,24 @@
package com.evolveum.midpoint.gui.api.component;

import com.evolveum.midpoint.gui.api.GuiStyleConstants;
import com.evolveum.midpoint.gui.api.component.result.OpResult;
import com.evolveum.midpoint.gui.api.component.tabs.CountablePanelTab;
import com.evolveum.midpoint.gui.api.model.LoadableModel;
import com.evolveum.midpoint.gui.api.page.PageBase;
import com.evolveum.midpoint.gui.api.util.GuiDisplayTypeUtil;
import com.evolveum.midpoint.gui.api.util.WebComponentUtil;
import com.evolveum.midpoint.gui.impl.component.icon.CompositedIcon;
import com.evolveum.midpoint.gui.impl.component.icon.CompositedIconBuilder;
import com.evolveum.midpoint.gui.impl.component.icon.IconCssStyle;
import com.evolveum.midpoint.gui.impl.component.search.Search;
import com.evolveum.midpoint.gui.impl.component.search.wrapper.AbstractRoleSearchItemWrapper;
import com.evolveum.midpoint.gui.impl.page.admin.abstractrole.component.MemberOperationsHelper;
import com.evolveum.midpoint.gui.impl.page.admin.abstractrole.component.MemberOperationsTaskCreator;
import com.evolveum.midpoint.model.api.AssignmentCandidatesSpecification;
import com.evolveum.midpoint.model.api.AssignmentObjectRelation;
import com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.query.ObjectQuery;
import com.evolveum.midpoint.schema.constants.ObjectTypes;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.util.QNameUtil;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
Expand Down Expand Up @@ -130,9 +129,21 @@ public void onClick(AjaxRequestTarget target) {
if (selectedObjects == null || selectedObjects.size() == 0) {
continue;
}
executeMemberOperation(memberPanel.getAbstractRoleTypeObject(),
createInOidQuery(selectedObjects), memberPanel.getRelationValue(),
memberPanel.getObjectType().getTypeQName(), target, getPageBase());

var pageBase = getPageBase();
var taskCreator = new MemberOperationsTaskCreator.Assign(
memberPanel.getAbstractRoleTypeObject(),
memberPanel.getObjectType().getTypeQName(),
createInOidQuery(selectedObjects),
pageBase,
memberPanel.getRelationValue());

pageBase.taskAwareExecutor(target, taskCreator.getOperationName())
.withOpResultOptions(OpResult.Options.create()
.withHideTaskLinks(shouldHideTaskLink()))
.withCustomFeedbackPanel(getFeedbackPanel())
.run(taskCreator::createAndSubmitTask);

if (memberPanel.getObjectType().equals(ObjectTypes.ORG)) {
orgPanelProcessed = true;
}
Expand Down Expand Up @@ -414,10 +425,9 @@ private boolean isAddButtonEnabled() {
return false;
}

protected Task executeMemberOperation(AbstractRoleType targetObject, ObjectQuery query,
@NotNull QName relation, QName type, AjaxRequestTarget target, PageBase pageBase) {
return MemberOperationsHelper.createAndSubmitAssignMembersTask(targetObject, type, query,
relation, target, pageBase);
/** Should the "show task" link be hidden? This feature is used in wizards to avoid complexity for users. */
protected boolean shouldHideTaskLink() {
return false;
}

private IModel<List<CompositedIconButtonDto>> createAssignButtonDescriptionModel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ protected ObjectQuery getCustomizeContentQuery() {
Task task = TypedAssignablePanel.this.getPageBase().createSimpleTask(OPERATION_LOAD_ASSIGNABLE_ROLES);
OperationResult result = task.getResult();

ObjectFilter filter = WebComponentUtil.getAssignableRolesFilter(AuthUtil.getPrincipalUser().getFocus().asPrismObject(), AbstractRoleType.class,
ObjectFilter filter = WebComponentUtil.getAssignableRolesFilter(
AuthUtil.getPrincipalUser().getFocusPrismObject(), AbstractRoleType.class,
WebComponentUtil.AssignmentOrder.ASSIGNMENT, result, task, TypedAssignablePanel.this.getPageBase());
query = getPrismContext().queryFactory().createQuery(filter);
}
Expand Down

0 comments on commit a9ccf90

Please sign in to comment.