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


On Wednesday, September 20, 2023 at 9:05:46 AM UTC-6 Nason Bimbe wrote:

> Hello - on our DSpace 7.6, we are using Shibboleth Authentication method. 
> How can we remove the 'Have you forgotten your password?' link?
>
> Thanks 
> Nason
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-community/a7fd1fcc-9b69-44b7-bf59-fd6ffe948e4fn%40googlegroups.com.

Reply via email to