Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Mar 3, 2023
2 parents 0877e9a + c01941e commit a3914a0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
package com.evolveum.midpoint.gui.impl.page.forgotpassword;

import com.evolveum.midpoint.gui.impl.page.login.AbstractPageLogin;
import com.evolveum.midpoint.gui.impl.page.login.PageLogin;
import com.evolveum.midpoint.gui.impl.page.self.credentials.ChangePasswordPanel;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;

import com.evolveum.midpoint.web.component.AjaxButton;
import com.evolveum.midpoint.web.component.form.MidpointForm;

import org.apache.wicket.RestartResponseException;
import org.apache.wicket.ajax.AjaxRequestTarget;

import com.evolveum.midpoint.authentication.api.authorization.AuthorizationAction;
Expand Down Expand Up @@ -108,7 +110,7 @@ protected void finishChangePassword(final OperationResult result, AjaxRequestTar

showResult(result);
AuthUtil.clearMidpointAuthentication();
setResponsePage(new RedirectPage("/"));
throw new RestartResponseException(PageLogin.class);
} else if (showFeedback) {
showResult(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.util.List;
import javax.xml.namespace.QName;

import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;

import org.apache.wicket.markup.html.form.IChoiceRenderer;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.StringResourceModel;
Expand All @@ -26,9 +28,14 @@ public Object getDisplayValue(QName qname) {
if (qname == null) {
return null;
}

ObjectTypes ot = ObjectTypes.getObjectTypeFromTypeQName(qname);
String key = WebComponentUtil.createEnumResourceKey(ot);
String key = null;
try {
ObjectTypes ot = ObjectTypes.getObjectTypeFromTypeQName(qname);
key = WebComponentUtil.createEnumResourceKey(ot);
} catch (Exception e) {
key = ObjectType.class.getSimpleName() + "." + qname.getLocalPart(); //HACK exception occurs during the attempt to find ObjectTypes value for
// containerable (not objectable) type. therefore generate key in this way
}
return new StringResourceModel(key).setDefaultValue(key).getString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6244,6 +6244,11 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<!--
TODO: Consider renaming, because returnTypeof type QName is used also in expression, which is a mere level above and can be confusing.
Also - this seems to do nothing at the moment, it probably ends in ScriptExpressionEvaluationContext#suggestedReturnType and is not used further.
Related Jira: MID-8552
-->
<xsd:element name="returnType" type="tns:ScriptExpressionReturnTypeType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Expand All @@ -6253,10 +6258,12 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<!-- TODO: Consider renaming to referenceVariableMode. -->
<xsd:element name="objectVariableMode" type="tns:ObjectVariableModeType" minOccurs="0" default="object">
<xsd:annotation>
<xsd:documentation>
Type of object variables that appear in the script.
Specifies how reference variables should be provided for the script.
By default, they are resolved to objects.
</xsd:documentation>
<xsd:appinfo>
<a:since>4.0</a:since>
Expand Down Expand Up @@ -6343,7 +6350,8 @@
<xsd:simpleType name="ObjectVariableModeType">
<xsd:annotation>
<xsd:documentation>
Type of object variables that appear in the script.
Specifies how reference variables should be provided for the script.
By default, they are resolved to objects.
</xsd:documentation>
<xsd:appinfo>
<jaxb:typesafeEnumClass/>
Expand Down

0 comments on commit a3914a0

Please sign in to comment.