How to log in directly to the Bonita User Application instead of the bonita app directory home?

Hi, 

Most of my users have the profile User only. I want them to land on the User task list app instead of reaching the App directory bonita home page where there is one more click for them on the only application they have access to.   
Instead of landing on the list of app : http://localhost:8080/bonita/apps/appDirectoryBonita/home/?_l=en
I want the user to land directly on: http://localhost:8080/bonita/apps/userAppBonita/task-list/

I've tried to change the file:
server/webapps/bonita/index.html
And replaced: window.location = "/apps/appDirectoryBonita" + window.location.search + window.location.hash;
By: window.location = "apps/userAppBonita" + window.location.search + window.location.hash;

And it works, everyone is redirected to the user Application (even the user with several profiles). But if the user who's logging in doesn't have the profile User, then they reach a 403. There is only one of them tho. 

Do you have another solution to suggest for this use case?

Thank you! 

1 Like

Hi,

For instance, with URL http://localhost:8080/bonita/apps/userAppBonita/task-list/, Bonita mechanism reroutes you to the login page with a proper redirect URL of the type http://localhost:8080/bonita/login.jsp?redirectUrl=%2Fbonita%2Fapps%2FuserAppBonita%2Ftask-list, which, after proper login, redirects you to the precise App and Page you specified.

Why not accessing directly to the URL you want to reach?Hope this helps.

Hi, 
Thank you for your response, let me try to explain my use case a little more.

Currently if we go to http://localhost:8080 the page loads the following url:
http://localhost:8080/bonita/login.jsp?_l=en&redirectUrl=apps%2FappDirectoryBonita

If the user login, he will be redirected to:
http://localhost:8080/bonita/apps/appDirectoryBonita/home/?_l=en
We want to avoid that page and be redirected to: http://localhost:8080/bonita/apps/userAppBonita/task-list/ instead

Is there a way to change the default url so if the user go to http://localhost:8080 it loads as
http://localhost:8080/bonita/login.jsp?redirectUrl=%2Fbonita%2Fapps%2FuserAppBonita%2Ftask-list
instead of http://localhost:8080/bonita/login.jsp?_l=en&redirectUrl=apps%2FappDirectoryBonita

 

The default homepage for bonita is maintained in /server/webapps/bonita/index.html file. In this file the following section must be edited to change the default home page

 

javascript :

window.location = "apps/appDirectoryBonita" + window.location.search + window.location.hash;

For example, if you'd like to change the default landing page to the task list page, update the above section to

javascript:
window.location = "/bonita/apps/userAppBonita/task-list/" + window.location.search + window.location.hash;

Restart Tomcat after making this change.

NOTE: When you update your version of bonita you will lose this change and you must reimplement the change.