blob: c6102045417beaa3dc92ada48d1486c1026c31c7 [file] [log] [blame]
<!--
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.security.Security}" >
<!define name="content">
<event>
<!beforeCreate
getRequestValue(key="configName" value="#{pageSession.configName}" );
gf.isConfigName(configName="#{pageSession.configName}" exists="#{requestScope.exists}" );
if (! #{requestScope.exists}){
gf.redirect("#{request.contextPath}/common/configuration/configurations.jsf");
}
setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/common/security/security.jsf?configName=#{pageSession.configName}");
setPageSessionAttribute(key="selfUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/security-service");
gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}.json", valueMap="#{pageSession.valueMap}");
gf.restRequest(endpoint="#{pageSession.selfUrl}/property.json" method="GET" result="#{requestScope.propTable}");
setPageSessionAttribute(key="tableList" value="#{requestScope.propTable.data.extraProperties.properties}");
setPageSessionAttribute(key="convertToFalseList" value={"auditEnabled","activateDefaultPrincipalToRoleMapping"})
/>
</event>
<sun:form id="propertyForm" autoComplete="off">
#include "/common/shared/alertMsg.inc"
<sun:title id="propertyContentPage" title="$resource{i18nc.security.Security}" helpText="$resource{i18nc.security.SecurityPageHelp}">
<!facet pageButtonsTop>
<sun:panelGroup id="topButtons">
<sun:button id="saveButton" text="$resource{i18n.button.Save}"
onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}')) {submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" >
<!command
convertArrayToCommaString(array="#{pageSession.selectedAuditModules}" commaString="#{requestScope.tmp}");
mapPut(map="#{pageSession.valueMap}" key="auditModules" value="#{requestScope.tmp}");
gf.createEntity(endpoint="#{pageSession.selfUrl}"
attrs="#{pageSession.valueMap}"
skipAttrs="#{pageSession.skipAttrsList}"
convertToFalse="#{pageSession.convertToFalseList}"
);
saveSecurityManagerValue(configName="#{pageSession.configName}" value="#{pageSession.securityManagerStatus}");
// Save properties...
removeEmptyProps(props="#{pageSession.tableList}" modifiedProps="#{pageSession.tableList}");
javaToJSON(obj="#{pageSession.tableList}" json="#{requestScope.tmpJSON}");
gf.restRequest(endpoint="#{pageSession.selfUrl}/property.json", method="POST", data="#{requestScope.tmpJSON}", result="#{requestScope.restResponse}");
prepareSuccessfulMsg();
gf.redirect(page="#{pageSession.selfPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
/>
</sun:button>
</sun:panelGroup>
</facet>
</sun:title>
#include "/common/security/securityAttrs.inc"
#include "/common/shared/propertyDescTable.inc"
<sun:hidden id="helpKey" value="$resource{help_common.security}" />
</sun:form>
#include "/common/shared/changeButtonsJS.inc"
</define>
</composition>