All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.edit_password_policy.jsp Maven / Gradle / Ivy

The newest version!
<%--
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */
--%>

<%@ include file="/init.jsp" %>

<%
long passwordPolicyId = ParamUtil.getLong(request, "passwordPolicyId");

PasswordPolicy passwordPolicy = PasswordPolicyLocalServiceUtil.fetchPasswordPolicy(passwordPolicyId);

if (passwordPolicy == null) {
	passwordPolicy = new PasswordPolicyImpl();

	passwordPolicy.setNew(true);
}

boolean defaultPolicy = BeanParamUtil.getBoolean(passwordPolicy, request, "defaultPolicy");

PasswordPoliciesConfiguration passwordPoliciesConfiguration = (PasswordPoliciesConfiguration)request.getAttribute(PasswordPoliciesConfiguration.class.getName());

portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(String.valueOf(renderResponse.createRenderURL()));

renderResponse.setTitle(passwordPolicy.isNew() ? LanguageUtil.get(request, "new-password-policy") : passwordPolicy.getName());
%>






	
	

	
	

	

	
		
			

			
		

		
			
				
<% for (long duration : _sort(passwordPoliciesConfiguration.minimumAgeDurations())) { %> <% } %>
<% for (long duration : _sort(passwordPoliciesConfiguration.resetTicketMaxAgeDurations())) { %> <% } %>
<% String taglibHelpMessage = LanguageUtil.format(request, "regular-expression-help", new Object[] {"", ""}, false); %>
<% for (int i = 2; i < 25; i++) { %> <% } %>
<% for (long duration : _sort(passwordPoliciesConfiguration.maximumAgeDurations())) { %> <% } %> <% for (long duration : _sort(passwordPoliciesConfiguration.expirationWarningTimeDurations())) { %> <% } %>
<% for (long duration : _sort(passwordPoliciesConfiguration.resetFailureDurations())) { %> <% } %> <% for (long duration : _sort(passwordPoliciesConfiguration.lockoutDurations())) { %> <% } %>
Liferay.Util.toggleBoxes( 'changeable', 'changeableSettings' ); Liferay.Util.toggleBoxes( 'checkSyntax', 'syntaxSettings' ); Liferay.Util.toggleBoxes( 'expireable', 'expirationSettings' ); Liferay.Util.toggleBoxes( 'history', 'historySettings' ); Liferay.Util.toggleBoxes( 'lockout', 'lockoutSettings' ); <% if (passwordPolicy != null) { PortalUtil.addPortletBreadcrumbEntry(request, passwordPolicy.getName(), null); PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(request, "edit"), currentURL); } else { PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(request, "add-user"), currentURL); } %> <%! private static long[] _sort(long[] array) { Arrays.sort(array); return array; } %> <%@ include file="/action/delete_password_policy.jspf" %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy