Parameters
operator |
string | Internal login of the operator to escalate to, e.g. webapp. |
Returns
| context | The previous login context — pass it back to logon() to restore. |
Examples
A JSSP page or web app runs as the Anonymous operator by default, so any NLWS database call returns XTK-170019 Access denied. logonEscalation switches the session to a privileged operator (commonly webapp) so the rest of the page can read and write data.
It returns the previous context; restore it with logon(oldContext) once the privileged work is done.
var oldContext = logonEscalation("webapp"); // escalate to the webapp operator (grants DB access)
// ... privileged work, e.g. NLWS queries ...
logon(oldContext); // restore the previous (anonymous) contextDo not use
logon(login)to escalate — it is deprecated and logsThe 'logon' JavaScript method is deprecated. UselogonEscalation, or one oflogonWithUser(login, password),logonWithToken(token),logonWithContext(context).logon()remains valid only to restore a context returned bylogonEscalation.
See also
-
📕 request- TheHttpServletRequestobject — read query parameters, body, headers and client info in a JSSP. -
📕 response- TheHttpServletResponseobject — set the content type, headers, cookies and redirects in a JSSP.