admincheck.jsp revision 47865bca6b632be56381a140939bdd446eec4514
a5b9f8fb834b1b2208e59a2fa76714bd91a5f147violette DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
a5b9f8fb834b1b2208e59a2fa76714bd91a5f147violette Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
<%@ page import="com.iplanet.am.util.SystemProperties" %>
<%@ page import="com.iplanet.sso.SSOException" %>
<%@ page import="com.iplanet.sso.SSOToken" %>
<%@ page import="com.iplanet.sso.SSOTokenManager" %>
<%@ page import="com.sun.identity.common.DNUtils" %>
<%@ page import="com.sun.identity.idm.AMIdentity" %>
<%@ page import="com.sun.identity.idm.IdRepoException" %>
<%@ page import="com.sun.identity.idm.IdType" %>
<%@ page import="com.sun.identity.idm.IdUtils" %>
<%@ page import="com.sun.identity.shared.debug.Debug" %>
<%@ page import="com.sun.identity.shared.encode.Hash" %>
<%@ page import="com.sun.identity.shared.ldap.util.DN" %>
<%@ page import="com.sun.identity.sm.SMSEntry" %>
<%@ page import="javax.servlet.http.HttpServletRequest" %>
<%@ page import="java.io.IOException" %>
<%@ page import="java.util.ResourceBundle" %>
<%@ page import="java.text.MessageFormat" %>
* @param out The JspWriter used to inform the HTTP client that they are unauthorized to view this page.
* @param currentPageUrl The path of the JSP page in which this file has been included, relative to AM root.
SSOTokenManager manager = SSOTokenManager.getInstance();
ssoToken = manager.createSSOToken(request);
manager.validateToken(ssoToken);
adminUserDN = DNUtils.normalizeDN(adminUser);
adminUserId = new AMIdentity(ssoToken, adminUser, IdType.USER, "/", null);
if ((!adminUserDN.equals(DNUtils.normalizeDN(ssoToken.getPrincipal().getName()))) && (!user.equals(adminUserId))) {
String errorMsgTemplate = ResourceBundle.getBundle("encode", request.getLocale()).getString("invalid.uid");