Default Home Page route of Role not working

I created a custom Role for a custom DocType named “Repair”. The “User-A” assigned with this Custom Role ONLY, have complete access to this DocType. He is able to view the List of the DocType by typing the URL directly. What I am trying to achieve is to redirect the User with this Role to the route “/desk#List/Repair/List” by default after logging in, I tried to set the home page route in the Custom Role settings but it is redirecting to the “/desk”. I tried clearing the bench cache , browser cache,reloading the nginx and supervisorctl but no change.

Anyone was able to solve this? Also what if a same user has two Roles and each a different home page path, which one will it take?

I wonder why the homepage path is even part of “Role” setting, it would make more sense to be part of “User” instead, no? User to Role relationship is 1-to-many.

Were you able to solve this? @manasan

Hello @SamSam,
about the “two Roles and each have diff home_page”.
In code we can see this:

get_roles function is this:

It means: It takes home_page from the first role (if the home_page is defined here) from the list of the roles. These roles are sort by random (no order in query), I think. Maybe I am wrong about default ordering.

The result is, it is random selection of the home_page, unfortunately.

JS