Forum

This content is now out of date.

Visit Our Community

Can we make a custom MIRequireLogin.i4 or point at the login page?

The instructions for custom login pages in the wiki are fantastic.

I would also like to customise the screen that shows when users try to access content directly without having logged in first (http://yellowfinbaseurl/MIRequireLogin.i4).

I have found references in struts-config-mi.xml and struts-config-mobile.xml, will I break the system if I point those references at my newly created login page? Will the redirect still work?
Hi Max,

It is possible to do, but it's not just a matter of pointing it to your other custom login page.

You need to actually create a seperate 'login page' that is displayed when prompted to login
-If that makes any sense ;)

Easiest way to do this is to ;

1. Get to the page that prompts you to login, and view the page source.

2. Copy that page source into your own custom jsp file. Save it in the YellowfinappserverROOT folder.

3. Open the struts-config-mi.xml , and reference your file in the /MIRequireLogin section.

E.g.
[code]
type="com.hof.mi.web.action.MIRequireLoginAction"
name="MIForm"
scope="session">


[/code]


4. Restart Yellowfin

You can now style your new JSP however you like.

Here is an example of the code I used to create my own 'Require Login Page' :

[code]




Login



















































 


























 














You are required to login to view this content.












Login:
 

Go


 


 

















[/code]



Please let us know how you go.

Regards,
David
Fantastic, thank you.
Hi David,

I went to follow these instructions today and had a look at the source code I was copying off the site. It contains a token which is different each time the page is loaded. It's around line 128:



I am concerned that I will break the system if set this as a static value in my JSP?
Hi Max,

It's only really in the example cause it was from my page.
You don't actually need this in there, it's just there to stop people from trying to hit back/refresh etc and not having to re-input the login details.

Let me know if you have any issues after removing this line, or just leaving it in.

Regards,
David

Success! Everything works as it should, including directing the user to the appropriate dashboard/report.

I removed the line - didn't try leaving it in.