38
APPL/PRS/prs_impersonate.asp
Normal file
38
APPL/PRS/prs_impersonate.asp
Normal file
@@ -0,0 +1,38 @@
|
||||
<%@language = "javascript" %>
|
||||
<%
|
||||
/* $Revision$
|
||||
$Id$
|
||||
|
||||
File: prs_impersonate.asp
|
||||
Description:
|
||||
Parameters: prs_key (required)
|
||||
|
||||
Context:
|
||||
Note:
|
||||
|
||||
*/
|
||||
var JSON_Result = true;
|
||||
%>
|
||||
<!-- #include file="../Shared/common.inc" -->
|
||||
<!-- #include file="../Shared/login.inc" -->
|
||||
<!--#include file="../Shared/json2.js" -->
|
||||
<!-- #include file="prs.inc" -->
|
||||
<%
|
||||
protectRequest.validateToken();
|
||||
|
||||
user.auth_required_or_abort(S("prs_allow_impersonate"));
|
||||
user.checkAutorisation("WEB_PRSSYS");
|
||||
|
||||
var prs_key = getFParamInt("prs_key");
|
||||
var other = new Perslid(prs_key);
|
||||
if (other.checkAutorisation("WEB_FACFAC", true))
|
||||
abort_with_warning("Sorry, someone with WEB_FACFAC autorisation cannot be impersonated");
|
||||
|
||||
Session("org_user_key") = user_key;
|
||||
Session("org_user_key_ts") = new Date().getTime();
|
||||
shared.trackaction("PRSLOG", prs_key, "INLOGGEN ALS"); // TODO: Betere tekst
|
||||
doLogin(prs_key);
|
||||
|
||||
result = { success: "true" };
|
||||
Response.Write(JSON.stringify(result));
|
||||
%>
|
||||
Reference in New Issue
Block a user