| <!-- |
| |
| Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0, which is available at |
| http://www.eclipse.org/legal/epl-2.0. |
| |
| This Source Code may also be made available under the following Secondary |
| Licenses when the conditions for such availability set forth in the |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| version 2 with the GNU Classpath Exception, which is available at |
| https://www.gnu.org/software/classpath/license.html. |
| |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| |
| --> |
| |
| <!initPage |
| setResourceBundle(key="i18nc" bundle="org.glassfish.common.admingui.Strings") |
| setResourceBundle(key="help_common" bundle="org.glassfish.common.admingui.Helplinks"); |
| /> |
| <!composition template="/templates/default.layout" guiTitle="$resource{i18nc.manageUsers.EditPageTitle}" > |
| <!define name="content"> |
| <event> |
| <!beforeCreate |
| getRequestValue(key="configName" value=>$page{configName} default="server-config"); |
| getRequestValue(key="name" value="#{pageSession.Name}"); |
| getRequestValue(key="user" value="#{pageSession.User}"); |
| urlencode(value="#{pageSession.Name}" encoding="UTF-8" result="#{pageSession.encodedName}"); |
| urlencode(value="#{pageSession.configName}" encoding="UTF-8" result="#{pageSession.encodedConfigName}"); |
| urlencode(value="#{pageSession.User}" encoding="UTF-8" result="#{pageSession.encodedUser}"); |
| getUserInfo(Realm="#{pageSession.Name}" configName="#{pageSession.configName}" User="#{pageSession.User}", GroupList="#{pageSession.groupList}"); |
| gf.restRequest(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/admin-service/jmx-connector/system.json", method="get", result="#{requestScope.result}"); |
| setPageSessionAttribute(key="AuthRealmName" value="#{requestScope.result.data.extraProperties.entity.authRealmName}"); |
| setPageSessionAttribute(key="isAdminRealm", value="false") |
| if ("#{pageSession.Name}=#{pageSession.AuthRealmName}"){ |
| if ("#{pageSession.configName}=server-config"){ |
| setPageSessionAttribute(key="isAdminRealm", value="true") |
| } |
| } |
| /> |
| </event> |
| <sun:form id="propertyForm" autoComplete="off"> |
| #include "/common/shared/alertMsg.inc" |
| <!-- Page Title --> |
| <sun:title id="propertyContentPage" title="$resource{i18nc.manageUsers.EditPageTitle}" |
| helpText="$resource{i18nc.manageUsers.EditPageTitleHelp}"> |
| <!-- Buttons --> |
| <!facet pageButtonsTop> |
| <sun:panelGroup id="topButtons"> |
| <sun:button id="saveButton" text="$resource{i18n.button.Save}" |
| onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}') && checkPSW()){submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" > |
| <!command |
| prepareSuccessfulMsg(); |
| saveUser( |
| Realm="#{pageSession.Name}" |
| configName="#{pageSession.configName}" |
| UserId="#{pageSession.User}" |
| GroupList="#{pageSession.groupList}" |
| Password="#{pageSession.password}" |
| CreateNew="false" |
| ); |
| /> |
| </sun:button> |
| <sun:button id="cancelButton" text="$resource{i18n.button.Back}" immediate="$boolean{true}" primary="#{false}" > |
| <!command |
| gf.redirect(page="#{request.contextPath}/common/security/realms/manageUsers.jsf?name=#{pageSession.encodedName}&configName=#{pageSession.encodedConfigName}") |
| /> |
| </sun:button> |
| </sun:panelGroup> |
| </facet> |
| </sun:title> |
| <!-- PropertySheet .... --> |
| <sun:propertySheet id="propertySheet" requiredFields="true"> |
| #include "/common/shared/configNameSection.inc" |
| <!-- Text Field section --> |
| <sun:propertySheetSection id="propertSectionTextField"> |
| <sun:property id="NameProp" rendered="#{edit}" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.realm.realmName}" > |
| <sun:staticText id="NameStatic" text="#{pageSession.Name}"/> |
| </sun:property> |
| <sun:property id="userIdProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.manageUsers.UserID}"> |
| <sun:staticText id="UserId" text="#{pageSession.User}"/> |
| </sun:property> |
| |
| <sun:property id="groupListProp2" rendered="#{pageSession.isAdminRealm}" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.manageUsers.GroupList}" > |
| <sun:staticText id="GroupList2" text="#{pageSession.groupList}" rendered="#{pageSession.isAdminRealm}"/> |
| </sun:property> |
| |
| <sun:property id="groupListProp" rendered="#{!isAdminRealm}" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.manageUsers.GroupList}" helpText="$resource{i18nc.manageUsers.GroupListHelp}"> |
| <sun:textField id="GroupList" text="#{pageSession.groupList}" rendered="#{!isAdminRealm}" columns="$int{55}" maxLength="#{sessionScope.fieldLengths['maxLength.manageUsers.GroupList']}"/> |
| </sun:property> |
| |
| <sun:property id="newPasswordProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.manageUsers.NewPassword}"> |
| <sun:passwordField id="NewPassword" name="password" columns="$int{25}" text="#{pageSession.password}" > |
| <!afterCreate |
| getClientId(component="$this{component}" clientId=>$page{ps1}); |
| /> |
| </sun:passwordField> |
| </sun:property> |
| <sun:property id="confirmPasswordProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.manageUsers.ConfirmNewPassword}"> |
| <sun:passwordField id="ConfirmPassword" name="password" columns="$int{25}" text="#{pageSession.confirmPassword}" > |
| <!afterCreate |
| getClientId(component="$this{component}" clientId=>$page{ps2}); |
| /> |
| </sun:passwordField> |
| </sun:property> |
| "<br /><br /> |
| </sun:propertySheetSection> |
| |
| </sun:propertySheet> |
| <sun:hidden id="helpKey" value="$resource{help_common.manageUserEdit}" /> |
| </sun:form> |
| #include "checkpswd.inc" |
| </define> |
| </composition> |