Rev 6579 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'=====================================================' Masquerade Screen' Masquerade as another user' Aquire the permission of another user' An Administration type of function useful for proving the capabilities of a user'=====================================================%><%Option explicitResponse.Expires = 0%><!--#include file="common/conf.asp"--><!--#include file="common/globals.asp"--><!--#include file="common/qstr.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="_access_control_general.asp"--><%'------------ VARIABLE DEFINITION -------------Dim canMasquerade'------------ CONSTANTS DECLARATION -----------'------------ VARIABLE INIT -------------------canMasquerade = canActionControl("Masquerade")'------------ CONDITIONS ----------------------'----------------------------------------------%><%'----------------------------------------------------------------------------------------------------------------------------------------------Sub Logon ()On Error Resume NextobjEH.Try()Call objAccessControl.MasqueradeAsUser ( Request("user_name"), objAccessControl.UserName )objEH.Catch()End Sub'----------------------------------------------------------------------------------------------------------------------------------------------Sub AccessManagerMessage ( nMessage )Dim sMessageOn Error Resume NextobjEH.Try()Select Case CInt( nMessage )Case 1Err.Raise 8, _"Application Access Denied !", "Please contact the <a href='mailto:"& ADMIN_EMAIL &"' class='body_link'>Administrator</a> to gain access to this application."Case 2Err.Raise 8, _"Page Access Denied !", "Please contact the <a href='mailto:"& ADMIN_EMAIL &"' class='body_link'>Administrator</a> to gain access to this page."Case 3Err.Raise 8, _"Application is Off-Line !", "This application is currently off-line for maintenance. <br>Contact the <a href='mailto:"& ADMIN_EMAIL &"' class='body_link'>Administrator</a> for further details."Case 4Err.Raise 8, _"You are Not Authorised !", "You are not authorised to perform this action. <br>Contact the <a href='mailto:"& ADMIN_EMAIL &"' class='body_link'>Administrator</a> for further details."End SelectobjEH.Catch()End Sub'----------------------------------------------------------------------------------------------------------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------objPMod.PersistInQryString ( aPersistList )If NOT canActionControl("Masquerade") ThenCall RaiseMsg(enum_WMSG_ERROR, "Access Denied to this function.<p>One a user has switched roles the Masquerading function may not be available.")End If' --- RUN onPostBack ---If CBool(Request("action")) ThenCall Logon ()If objEH.Finally ThenIf Request("rfile") <> "" ThenCall OpenInWindow ( Request("rfile") &"?LOGIN=ok"& objPMod.ComposeURLWithout("rfile") )ElseCall OpenInWindow ( "index.asp" )End IfEnd IfEnd If' Display Access Manager messages'Call AccessManagerMessage( Request("message") )'----------------------------------------------%><html><head><title>Release Manager</title><link rel="shortcut icon" href="<%=FavIcon%>"/><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="images/release_manager_style.css" type="text/css"><link rel="stylesheet" href="images/navigation.css" type="text/css"><script language="JavaScript" src="images/common.js"></script><!--#include file="_jquery_includes.asp"--></head><body leftmargin="0" topmargin="0" onLoad="FormName.user_name.focus();"><!-- HEADER ++++++++++++++++ --><!--#include file="_header.asp"--><!-- +++++++++++++++++++++++ --><table width="100%" border="0" cellspacing="0" cellpadding="0"><form name="FormName" method="post" action="<%=ScriptName%>" ><tr><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="42"></td></tr><tr><td align="center" valign="middle" bgcolor="#FFFFFF"><!-- LOGIN FROM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><table width="570" border="0" cellspacing="0" cellpadding="0"><tr><td align="right"><a href="<%=ACCESS_MANAGER_URL%>" title="Access Manager Home"><img src="icons/img_auth_by_access_manager.gif" width="103" height="26" hspace="2" vspace="3" border="0"></a></td></tr></table><table width="570" border="0" cellspacing="0" cellpadding="1"><tr><td background="images/bg_bage_2.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="10"><tr><td class="body_txt"><span class="body_h1"><img src="icons/i_user_lrg.gif" width="13" height="17" align="absmiddle"> Masquerade as another user</span> <br>Please enter a Username <br><hr width="100%" size="1" noshade color="#ACA899"></tr><tr><td align="center" valign="top"><table width="100" border="0" cellspacing="2" cellpadding="0"><tr><td width="10%" nowrap class="form_iname">Username</td><td width="1%"><input name="user_name" type="text" class="form_item" size="20"></td></tr><tr><td nowrap class="form_iname" valign="top"> </td><td valign="top"> </td></tr></table></td></tr><tr><td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><%=ProgressBar()%></td><td align="right"><input name="btn" type="submit" class="form_btn" value="Login" onclick="MM_validateForm('user_name','Username','R');return document.MM_returnValue"></td></tr></table></td></tr></table></td></tr></table></td></tr></table><!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --></td></tr><tr><td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="42"></td></tr><%=objPMod.ComposeHiddenTags()%><input type="hidden" name="action" value="true"></form></table><!-- FOOTER --><!--#include file="_footer.asp"--></body></html>