I was just looking at this yesterday. I think doing this "properly" might involve making some components themable that are not currently themable. I found the password link in
src/app/shared/log-in/log-in.component.html. There's logic in that template to test if a user is authenticated and to check if registrations are allowed, but the code that creates the password recovery link has no checks. I;m not exactly sure what logic should be there to determine if password recovery was a valid option, but I suspect that might be the place.
Rather than spend a lot of time making that themable, I just made a crappy hack to the core DSpace code to hide the menu divider and the password link. In src/app/shared/log-in/log-in.component.scss I added the following CSS
div.dropdown-divider, a.dropdown-item {
display: none
}
This will leave just the Shibboleth button on that log-in dropdown, assuming that like us you only support Shib auth and not others. I also copied the app/shared/auth-nav-menu component files from the custom theme into my own, then adjusted the size of the login menu by changing this CSS in src/themes/limestone/app/shared/auth-nav-menu/auth-nav-menu.component.scss (limestone is the name of our theme)
.loginDropdownMenu {
min-height: 120px;
}
An alternative method I thought about was making a change to my theme's auth-nav-menu.component.html template and remove the Login dropdown and just have it display the Shib login link when the user is not authenticated. That was more work that just hacking the CSS so I haven't done that yet.
- Darryl