Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Jan 30, 2020
2 parents a0a0bf6 + 8ebd0ce commit b383419
Show file tree
Hide file tree
Showing 112 changed files with 3,079 additions and 2,935 deletions.
94 changes: 47 additions & 47 deletions NOTICE
@@ -1,47 +1,47 @@
MidPoint Identity Manager
Copyright 2010-2018 Evolveum

This project is dual-licensed under Apache License 2.0
and European Union Public License. See LICENSE file for details.

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

This product includes portions created by Sun Microsystems
and other parties distributed under the terms of
Common Development and Distribution License (CDDL):
http://opensource.org/licenses/CDDL-1.0
Please see the headers of individual source files for more
details.

This product includes the jQuery JavaScript Library.
Copyright (c) 2012 jQuery Foundation and other contributors,
jQuery is dually licensed under the MIT and GPL licenses, and
is included in this software distribution under the MIT license.
For details, see the jQuery web site: http://jquery.com/

This product includes DejaVu fonts.
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
Bitstream Vera is a trademark of Bitstream, Inc.
For details, see http://dejavu-fonts.org
and http://dejavu-fonts.org/wiki/License

This product includes JasperReports Library
Copyright (c) 2001-2016 TIBCO Software Inc.
JasperReports Library is distributed under the terms of
GNU Lesser General Public Licenses (LGPL)

This product includes AdminLTE template
Copyright (c) 2014-2016 Abdullah Almsaeed
AdminLTE is distributed under the terms of The MIT License

This product includes software developed at
Python Software Foundation (https://www.python.org/).

This software contains unmodified binary redistributions for
H2 database engine (http://www.h2database.com/),
which is dual licensed and available under the MPL 2.0
(Mozilla Public License) or under the EPL 1.0 (Eclipse Public License).
An original copy of the license agreement can be found at:
http://www.h2database.com/html/license.html

MidPoint Identity Manager
Copyright 2010-2020 Evolveum
This project is dual-licensed under Apache License 2.0
and European Union Public License. See LICENSE file for details.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
This product includes portions created by Sun Microsystems
and other parties distributed under the terms of
Common Development and Distribution License (CDDL):
http://opensource.org/licenses/CDDL-1.0
Please see the headers of individual source files for more
details.
This product includes the jQuery JavaScript Library.
Copyright (c) 2012 jQuery Foundation and other contributors,
jQuery is dually licensed under the MIT and GPL licenses, and
is included in this software distribution under the MIT license.
For details, see the jQuery web site: http://jquery.com/
This product includes DejaVu fonts.
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
Bitstream Vera is a trademark of Bitstream, Inc.
For details, see http://dejavu-fonts.org
and http://dejavu-fonts.org/wiki/License
This product includes JasperReports Library
Copyright (c) 2001-2016 TIBCO Software Inc.
JasperReports Library is distributed under the terms of
GNU Lesser General Public Licenses (LGPL)
This product includes AdminLTE template
Copyright (c) 2014-2016 Abdullah Almsaeed
AdminLTE is distributed under the terms of The MIT License
This product includes software developed at
Python Software Foundation (https://www.python.org/).
This software contains unmodified binary redistributions for
H2 database engine (http://www.h2database.com/),
which is dual licensed and available under the MPL 2.0
(Mozilla Public License) or under the EPL 1.0 (Eclipse Public License).
An original copy of the license agreement can be found at:
http://www.h2database.com/html/license.html
11 changes: 11 additions & 0 deletions build-tools/pom.xml
Expand Up @@ -28,6 +28,7 @@
<name>midPoint build tools</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.test.skip>true</maven.test.skip>
</properties>

Expand Down Expand Up @@ -56,4 +57,14 @@
<url>http://nexus.evolveum.com/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
</plugins>
</build>
</project>
2 changes: 0 additions & 2 deletions dist/javadoc/pom.xml
Expand Up @@ -34,7 +34,6 @@
<artifactId>admin-gui</artifactId>
<version>4.1-SNAPSHOT</version>
<type>war</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
Expand All @@ -50,7 +49,6 @@
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>model-impl</artifactId>
<version>4.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

Expand Down
4 changes: 0 additions & 4 deletions dist/midpoint-api/pom.xml
Expand Up @@ -26,19 +26,16 @@
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>model-api</artifactId>
<version>4.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.infra</groupId>
<artifactId>common</artifactId>
<version>4.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.infra</groupId>
<artifactId>schema</artifactId>
<version>4.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.infra</groupId>
Expand All @@ -49,7 +46,6 @@
<groupId>com.evolveum.midpoint.infra</groupId>
<artifactId>util</artifactId>
<version>4.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

Expand Down
6 changes: 1 addition & 5 deletions gui/admin-gui/pom.xml
Expand Up @@ -218,7 +218,6 @@
<dependency>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
Expand Down Expand Up @@ -713,7 +712,7 @@
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations-java5</artifactId>
<artifactId>annotations</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
Expand Down Expand Up @@ -1017,17 +1016,14 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-annotations-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
Expand Down
Expand Up @@ -57,6 +57,13 @@
</div>
<div class="col-sm-9" wicket:id="initiatorNameField"/>
</div>
<div class="form-group">
<div class="col-sm-3 control-label">
<label><wicket:message key="PageAuditLogViewer.resourceOidLabel" /></label>
<i class="helpTextIcon" wicket:id="resourceOidFieldHelp"/>
</div>
<div class="col-sm-9" wicket:id="resourceOidField"/>
</div>
<div class="form-group">
<div class="col-sm-3 control-label">
<label><wicket:message key="PageAuditLogViewer.changedItem" /></label>
Expand Down
Expand Up @@ -113,6 +113,8 @@ public abstract class AuditLogViewerPanel extends BasePanel<AuditSearchDto> {
private static final String ID_VALUE_REF_TARGET_NAMES_FIELD_HELP = "valueRefTargetNamesFieldHelp";
private static final String ID_USED_QUERY_FIELD_HELP = "usedQueryFieldHelp";
private static final String ID_USED_INTERVAL_FIELD_HELP = "usedIntervalFieldHelp";
private static final String ID_RESOURCE_OID_FIELD = "resourceOidField";
private static final String ID_RESOURCE_OID_FIELD_HELP = "resourceOidFieldHelp";
private static final String ID_TO = "toField";
private static final String ID_INITIATOR_NAME = "initiatorNameField";
private static final String ID_TARGET_NAME_FIELD = "targetNameField";
Expand Down Expand Up @@ -203,6 +205,14 @@ private void initParametersPanel(Form mainForm) {
parametersPanel.add(to);
parametersPanel.add(getHelpComponent(ID_TO_FIELD_HELP, WebPrismUtil.getHelpText(getItemDefinition(AuditEventRecordType.F_TIMESTAMP))));

TextPanel<String> resourceOidFiels = new TextPanel<>(ID_RESOURCE_OID_FIELD, new PropertyModel<>(getModel(),
AuditSearchDto.F_RESOURCE_OID));
resourceOidFiels.getBaseFormComponent().add(new EmptyOnChangeAjaxFormUpdatingBehavior());
resourceOidFiels.getBaseFormComponent().add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
resourceOidFiels.setOutputMarkupId(true);
parametersPanel.add(resourceOidFiels);
parametersPanel.add(getHelpComponent(ID_RESOURCE_OID_FIELD_HELP, ""));

ItemPathPanel changedItemPanel = new ItemPathPanel(ID_CHANGED_ITEM, new PropertyModel<>(getModel(),
AuditSearchDto.F_CHANGED_ITEM));
changedItemPanel.setOutputMarkupId(true);
Expand Down Expand Up @@ -494,6 +504,9 @@ private Map<String, Object> getAuditEventProviderParameters() {
parameters.put(AuditEventRecordProvider.PARAMETER_HOST_IDENTIFIER, search.getHostIdentifier());
parameters.put(AuditEventRecordProvider.PARAMETER_REQUEST_IDENTIFIER, search.getRequestIdentifier());

if (StringUtils.isNotEmpty(search.getResourceOid())){
parameters.put(AuditEventRecordProvider.PARAMETER_RESOURCE_OID, search.getResourceOid());
}
if (search.getInitiatorName() != null) {
parameters.put(AuditEventRecordProvider.PARAMETER_INITIATOR_NAME, search.getInitiatorName().getOid());
}
Expand Down
Expand Up @@ -63,13 +63,15 @@ public class AuditEventRecordProvider extends BaseSortableDataProvider<AuditEven
public static final String PARAMETER_TARGET_OWNER_NAME = "targetOwnerName";
public static final String PARAMETER_TARGET_NAMES = "targetNames";
public static final String PARAMETER_TASK_IDENTIFIER = "taskIdentifier";
public static final String PARAMETER_RESOURCE_OID = "resourceOid";

@Nullable private final IModel<ObjectCollectionType> objectCollectionModel;
@NotNull private final SerializableSupplier<Map<String, Object>> parametersSupplier;

private static final String AUDIT_RECORDS_QUERY_SELECT = "select * ";
private static final String AUDIT_RECORDS_QUERY_CORE = " from m_audit_event as aer";
private static final String AUDIT_RECORDS_QUERY_ITEMS_CHANGED = " right join m_audit_item as item on item.record_id=aer.id ";
private static final String AUDIT_RECORDS_QUERY_RESOURCE_OID = " right join m_audit_resource as res on res.record_id=aer.id ";
private static final String AUDIT_RECORDS_QUERY_REF_VALUES = " left outer join m_audit_ref_value as rv on rv.record_id=aer.id ";
private static final String AUDIT_RECORDS_QUERY_COUNT = "select count(*) ";
private static final String AUDIT_RECORDS_ORDER_BY = " order by aer.";
Expand Down Expand Up @@ -198,6 +200,7 @@ public ObjectCollectionType getCollectionForQuery() {
private String generateFullQuery(Map<String, Object> parameters, boolean ordered, boolean isCount) {
boolean filteredOnChangedItem = parameters.get(PARAMETER_CHANGED_ITEM) != null;
boolean filteredOnValueRefTargetNames = filteredOnValueRefTargetNames(parameters);
boolean filteredOnResourceOid = parameters.get(PARAMETER_RESOURCE_OID) != null;
List<String> conditions = new ArrayList<>();
if (parameters.get(PARAMETER_FROM) != null) {
conditions.add("aer.timestampValue >= :from");
Expand Down Expand Up @@ -271,6 +274,11 @@ private String generateFullQuery(Map<String, Object> parameters, boolean ordered
} else {
parameters.remove(PARAMETER_CHANGED_ITEM);
}
if (filteredOnResourceOid) {
conditions.add("res.resourceOid = :resourceOid");
} else {
parameters.remove(PARAMETER_RESOURCE_OID);
}
if (filteredOnValueRefTargetNames) {
conditions.add("rv.targetName_orig in ( :valueRefTargetNames )");
} else {
Expand All @@ -284,6 +292,9 @@ private String generateFullQuery(Map<String, Object> parameters, boolean ordered
if (filteredOnChangedItem) {
query += AUDIT_RECORDS_QUERY_ITEMS_CHANGED;
}
if (filteredOnResourceOid) {
query += AUDIT_RECORDS_QUERY_RESOURCE_OID;
}
if (filteredOnValueRefTargetNames) {
query += AUDIT_RECORDS_QUERY_REF_VALUES;
}
Expand Down
Expand Up @@ -47,6 +47,7 @@ public class AuditSearchDto implements Serializable {
public static final String F_CHANGED_ITEM = "changedItem";
public static final String F_VALUE_REF_TARGET_NAME = "valueRefTargetNames";
public static final String F_COLLECTION = "collection";
public static final String F_RESOURCE_OID = "resourceOid";

private XMLGregorianCalendar from;
private XMLGregorianCalendar to;
Expand All @@ -63,6 +64,7 @@ public class AuditSearchDto implements Serializable {
private ItemPathDto changedItem;
private List<ObjectType> valueRefTargetNames;
private ObjectCollectionType collection;
private String resourceOid;

public AuditSearchDto() {
}
Expand Down Expand Up @@ -190,4 +192,12 @@ public ObjectCollectionType getCollection() {
public void setCollection(ObjectCollectionType collection) {
this.collection = collection;
}

public String getResourceOid() {
return resourceOid;
}

public void setResourceOid(String resourceOid) {
this.resourceOid = resourceOid;
}
}
1 change: 0 additions & 1 deletion icf-connectors/pom.xml
Expand Up @@ -43,7 +43,6 @@
<dependency>
<groupId>com.evolveum.midpoint.tools</groupId>
<artifactId>test-ng</artifactId>
<version>4.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency> <!-- Not used, but required for surefire plugin not to complain -->
Expand Down
22 changes: 9 additions & 13 deletions infra/common/pom.xml
Expand Up @@ -8,20 +8,19 @@

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>midPoint Infrastructure - common</name>
<groupId>com.evolveum.midpoint.infra</groupId>
<artifactId>common</artifactId>
<packaging>jar</packaging>

<parent>
<artifactId>infra</artifactId>
<groupId>com.evolveum.midpoint</groupId>
<version>4.1-SNAPSHOT</version>
</parent>
<scm>
<connection>https://github.com/Evolveum/midpoint.git</connection>
<developerConnection>git@github.com:Evolveum/midpoint.git</developerConnection>
<url>https://fisheye.evolveum.com/browse/midPoint</url>
</scm>

<groupId>com.evolveum.midpoint.infra</groupId>
<artifactId>common</artifactId>
<packaging>jar</packaging>

<name>midPoint Infrastructure - common</name>

<dependencies>
<dependency>
<groupId>com.evolveum.midpoint.infra</groupId>
Expand Down Expand Up @@ -63,7 +62,7 @@
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations-java5</artifactId>
<artifactId>annotations</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand Down Expand Up @@ -128,11 +127,8 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<scope>compile</scope>
</dependency>



<!-- Testing dependecies -->
<dependency>
<groupId>org.testng</groupId>
Expand Down

0 comments on commit b383419

Please sign in to comment.