Question
· Jan 16, 2020

Custom Login Page for IRIS

When I tried to migrate one of ZEN applications to IRIS from 2018.1 I'm faced with the issue with Login Page, in this case used some ZEN page, completely customized. But when a user tries to get access, he gets the error like below.

The requested URL /csp/user/User.Login.cls was not found on this server.

I tried to test it with a fresh just created login page class

Class User.Login Extends %CSP.Page
{ 

ClassMethod OnPage() As %Status
{
  &html<<h1>Hello</1>>
  Quit $$$OK
} 

}

Set it to /csp/user application as Login page, and

$ curl http://localhost:32784/csp/user/menu.csp
<HTML><HEAD>
<TITLE>Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /csp/user/User.Login.cls was not found on this server.
</BODY></HTML>

When I change my Login class to 

Class User.Login Extends %CSP.Login
{

}

Just extent system Login page, and it does work, shows login page as expected.

Well, %CSP.Login class in has some methods which documented as can be overridden

/// Provide a default login and security-token pages for CSP applications.

/// User can override the look of this page by creating a subclass and

/// overriding the DrawTitle method and the LOGINTITLE parameters.<br><br>

So, let's try to override DrawTitle method

Class User.Login Extends %CSP.Login
{

/// Draw the title section of the login page.<br>
/// <var>pTitle</var> is the title for the page.<br>
/// Users can override this method to customize the login page.
ClassMethod DrawTitle(pTitle As %String)
{

}

}

And the login page was not found again.

I use docker version of IRIS built by InterSystems. And I managed to get it worked only when I set public read permission for %DB_USER in case of user namespace. And I'm not sure if it is a good and right way to solve the issue. Does anybody know how correctly configure IRIS for custom Login page?

Discussion (4)1
Log in or sign up to continue