Skip to content

Commit

Permalink
Merge branch 'post-3.7-fixes' into support-3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Jan 15, 2018
2 parents 5acf836 + b30674c commit 82cbf72
Show file tree
Hide file tree
Showing 40 changed files with 1,449 additions and 307 deletions.
5 changes: 4 additions & 1 deletion dist/src/main/bin/midpoint.bat
Expand Up @@ -63,7 +63,10 @@ goto execStop
:execStart
echo "%cd%\lib\midpoint.war"
start /b javaw -jar -Xms2048M -Xmx2048M -Dpython.cachedir="%MIDPOINT_HOME%\tmp" -Djavax.net.ssl.trustStore="%MIDPOINT_HOME%\keystore.jceks" -Djavax.net.ssl.trustStoreType=jceks -Dmidpoint.home="%MIDPOINT_HOME%" "%cd%\lib\midpoint.war" > "%BOOT_OUT%" 2>&1 &
goto end

:execStop
echo "%cd%\lib\midpoint.war"
FOR /F "usebackq tokens=5" %%i IN (`netstat -aon ^| findstr "0.0.0.0:8080"`) DO taskkill /F /PID %%i
FOR /F "usebackq tokens=5" %%i IN (`netstat -aon ^| findstr "0.0.0.0:8080"`) DO taskkill /F /PID %%i

:end
Expand Up @@ -20,12 +20,12 @@

<div wicket:id="assignments" class="main-form-panel">
<div class="row">
<div class="col-xs-3">
<div class="col-xs-6">
<label class="col-xs-2 prism-property" ><wicket:message key="AbstractRoleAssignmentPanel.relationLabel" /></label>
<div class="col-xs-6" wicket:id="relation" />
<div class="col-xs-3" wicket:id="relation" />
</div>
<div class="col-xs-2 pull-right">
<div class="btn btn-default" wicket:id="showAllAssignmentsButton" />
<div class="col-xs-3 pull-right">
<div class="btn btn-default pull-right" wicket:id="showAllAssignmentsButton" />
</div>
</div>

Expand Down
Expand Up @@ -341,9 +341,9 @@ public HttpConnectionInformation getStoredConnectionInformation() {

@Override
public <O extends ObjectType> AccessDecision determineSubitemDecision(
ObjectSecurityConstraints securityConstraints, ObjectDelta<O> delta, String operationUrl,
ObjectSecurityConstraints securityConstraints, ObjectDelta<O> delta, PrismObject<O> currentObject, String operationUrl,
AuthorizationPhaseType phase, ItemPath subitemRootPath) {
return securityEnforcer.determineSubitemDecision(securityConstraints, delta, operationUrl, phase, subitemRootPath);
return securityEnforcer.determineSubitemDecision(securityConstraints, delta, currentObject, operationUrl, phase, subitemRootPath);
}

}
Expand Up @@ -1276,6 +1276,16 @@ public boolean isEmpty() {
}
return items.isEmpty();
}

public boolean isIdOnly() {
if (id == null) {
return false;
}
if (items == null || items.isEmpty()) {
return true;
}
return false;
}

@Override
public void normalize() {
Expand Down
Expand Up @@ -487,7 +487,12 @@ public static boolean containsEquivalent(Collection<ItemPath> paths, ItemPath pa
* - path = X -&gt; false
*/
public static boolean containsSuperpathOrEquivalent(Collection<ItemPath> paths, ItemPath pathToBeFound) {
return paths.stream().anyMatch(p -> p.isSuperPathOrEquivalent(pathToBeFound));
for (ItemPath path : paths) {
if (path.isSuperPathOrEquivalent(pathToBeFound)) {
return true;
}
}
return false;
}

/**
Expand All @@ -500,7 +505,12 @@ public static boolean containsSuperpathOrEquivalent(Collection<ItemPath> paths,
* - path = X -&gt; false
*/
public static boolean containsSuperpath(Collection<ItemPath> paths, ItemPath pathToBeFound) {
return paths.stream().anyMatch(p -> p.isSuperPath(pathToBeFound));
for (ItemPath path : paths) {
if (path.isSuperPath(pathToBeFound)) {
return true;
}
}
return false;
}

/**
Expand All @@ -513,7 +523,12 @@ public static boolean containsSuperpath(Collection<ItemPath> paths, ItemPath pat
* - path = X -&gt; false
*/
public static boolean containsSubpathOrEquivalent(Collection<ItemPath> paths, ItemPath pathToBeFound) {
return paths.stream().anyMatch(p -> p.isSubPathOrEquivalent(pathToBeFound));
for (ItemPath path : paths) {
if (path.isSubPathOrEquivalent(pathToBeFound)) {
return true;
}
}
return false;
}

/**
Expand All @@ -526,7 +541,12 @@ public static boolean containsSubpathOrEquivalent(Collection<ItemPath> paths, It
* - path = X -&gt; false
*/
public static boolean containsSubpath(Collection<ItemPath> paths, ItemPath pathToBeFound) {
return paths.stream().anyMatch(p -> p.isSubPath(pathToBeFound));
for (ItemPath path : paths) {
if (path.isSubPath(pathToBeFound)) {
return true;
}
}
return false;
}

public ItemPath namedSegmentsOnly() {
Expand Down Expand Up @@ -836,11 +856,21 @@ public static boolean containsSpecialSymbols(ItemPath path) {
}

public boolean containsSpecialSymbols() {
return segments.stream().anyMatch(s -> s instanceof IdentifierPathSegment || s instanceof ReferencePathSegment);
for (ItemPathSegment segment : segments) {
if (segment instanceof IdentifierPathSegment || segment instanceof ReferencePathSegment) {
return true;
}
}
return false;
}

public boolean containsSpecialSymbolsExceptParent() {
return segments.stream().anyMatch(s -> s instanceof IdentifierPathSegment || s instanceof ObjectReferencePathSegment);
for (ItemPathSegment segment : segments) {
if (segment instanceof IdentifierPathSegment || segment instanceof ObjectReferencePathSegment) {
return true;
}
}
return false;
}

public static void checkNoSpecialSymbols(ItemPath path) {
Expand Down
Expand Up @@ -454,7 +454,10 @@ public abstract class SchemaConstants {

public static final QName C_TRANSPORT_NAME = new QName(NS_C, "transportName");
public static final QName C_FROM = new QName(NS_C, "from");
public static final QName C_ENCODED_FROM = new QName(NS_C, "encodedFrom");
public static final QName C_TO = new QName(NS_C, "to");
public static final QName C_ENCODED_TO = new QName(NS_C, "encodedTo");
public static final QName C_MESSAGE_TEXT = new QName(NS_C, "messageText");
public static final QName C_ENCODED_MESSAGE_TEXT = new QName(NS_C, "encodedMessageText");
public static final QName C_MESSAGE = new QName(NS_C, "message");
public static final QName C_WORK_ITEM = new QName(NS_C, "workItem");
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010-2017 Evolveum
* Copyright (c) 2010-2018 Evolveum
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,6 +58,8 @@ public class InternalsConfig {
* use in testing.
*/
private static TestingPaths testingPaths = null;

private static boolean detailedAuhotizationLog = false;

public static boolean isPrismMonitoring() {
return prismMonitoring;
Expand Down Expand Up @@ -115,6 +117,14 @@ public static void setTestingPaths(TestingPaths testingPaths) {
InternalsConfig.testingPaths = testingPaths;
}

public static boolean isDetailedAuhotizationLog() {
return detailedAuhotizationLog;
}

public static void setDetailedAuhotizationLog(boolean detailedAuhotizationLog) {
InternalsConfig.detailedAuhotizationLog = detailedAuhotizationLog;
}

public static boolean isAllowClearDataLogging() {
return allowClearDataLogging;
}
Expand All @@ -135,6 +145,7 @@ public static void reset() {
avoidLoggingChange = false;
allowClearDataLogging = false;
testingPaths = null;
detailedAuhotizationLog = false;
}

public static void setDevelopmentMode() {
Expand Down
Expand Up @@ -53,6 +53,7 @@
import com.evolveum.midpoint.xml.ns._public.common.common_3.ConstExpressionEvaluatorType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ConstructionType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ExpressionType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.LoginEventType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectDeltaOperationType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;
Expand Down Expand Up @@ -815,6 +816,20 @@ public static String prettyPrint(ObjectDeltaOperationType deltaOpType) {
sb.append(")");
return sb.toString();
}

public static String prettyPrint(LoginEventType loginEventType) {
if (loginEventType == null) {
return "null";
}
StringBuilder sb = new StringBuilder("LoginEventType(");
sb.append(prettyPrint(loginEventType.getTimestamp()));
String from = loginEventType.getFrom();
if (from != null) {
sb.append(" from ").append(from);
}
sb.append(")");
return sb.toString();
}

public static String prettyPrint(JAXBElement<?> element) {
return "JAXBElement("+PrettyPrinter.prettyPrint(element.getName())+"): "+element.getValue();
Expand Down
Expand Up @@ -2799,11 +2799,7 @@
</p>
</xsd:documentation>
<xsd:appinfo>
AbstractConstructionType.description=Description
AbstractConstructionType.strength=Strength
AbstractConstructionType.strength.help=Strength of the construction defines how aggressively will the construction be applied.
ConstructionType.kind=Kind
ConstructionType.kind.help=Kind of resource object that should be created on the resource.
<a:displayName>UserType.nickName</a:displayName>
<a:displayOrder>140</a:displayOrder>
</xsd:appinfo>
</xsd:annotation>
Expand Down Expand Up @@ -18641,4 +18637,76 @@ ConstructionType.kind.help=Kind of resource object that should be created on the
</xsd:sequence>
</xsd:complexType>

<xsd:simpleType name="HttpMethodType">
<xsd:annotation>
<!-- This is meant as a general enumeration to be used at various places in midPoint.
Not all places of use are obliged to support all HTTP methods listed here. -->
<xsd:documentation>
Individual HTTP methods. Not all of them are supported by midPoint components.
</xsd:documentation>
<xsd:appinfo>
<jaxb:typesafeEnumClass/>
<a:since>3.7.1</a:since>
</xsd:appinfo>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="get">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="GET"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="post">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="POST"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="put">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="PUT"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="head">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="HEAD"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="patch">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="PATCH"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="delete">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="DELETE"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="options">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="OPTIONS"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="trace">
<xsd:annotation>
<xsd:appinfo>
<jaxb:typesafeEnumMember name="TRACE"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>

</xsd:schema>
Expand Up @@ -313,11 +313,72 @@
<!--</xsd:appinfo>-->
</xsd:annotation>
<xsd:sequence>
<xsd:element name="method" type="c:HttpMethodType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Which HTTP method is used to send SMS. Currently, "get" and "post" are supported.
If not specified, "get" is assumed.
</xsd:documentation>
<xsd:appinfo>
<a:since>3.7.1</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="url" type="c:ExpressionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
How to construct URL used to send SMS.
DEPRECATED. Use urlExpression instead.
</xsd:documentation>
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>3.7.1</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="urlExpression" type="c:ExpressionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expression that returns URL used to send SMS.
</xsd:documentation>
<xsd:appinfo>
<a:since>3.7.1</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="headersExpression" type="c:ExpressionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expression that returns HTTP request headers. The expression should return 0, 1 or more string values
that will be used as request HTTP headers. Each value is in the form of "name: value", i.e.
a header name followed by comma, space and a header value. If one header has to have more values,
such name-value pair should be present more times for the given header name.
</xsd:documentation>
<xsd:appinfo>
<a:since>3.7.1</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="bodyExpression" type="c:ExpressionType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expression that returns request body used to send SMS (as a string).
</xsd:documentation>
<xsd:appinfo>
<a:since>3.7.1</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="bodyEncoding" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Encoding to be used for the message body. ISO 8859-1 is the default.
Note that if you use any other encoding, your responsibility is to provide appropriate
Content-Type header (see headersExpression item). This requirement might change in the future.
</xsd:documentation>
<xsd:appinfo>
<a:since>3.7.1</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="username" type="xsd:string" minOccurs="0">
Expand All @@ -341,6 +402,16 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="logToFile" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
In addition to executing the expression, writes all messages to a file. Useful for debugging.
</xsd:documentation>
<xsd:appinfo>
<a:since>3.7.1</a:since>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
Expand Down

0 comments on commit 82cbf72

Please sign in to comment.