- last update
over 1 year ago 55 pass - last update
over 1 year ago 42 pass, 5 fail
When I disable the "Change own account" permission, the link to "Edit profile" is still available in the toolbar, and it leads the user to an "Access denied" error.
In 8.0.x through 8.4.x, this link can be removed with hook_toolbar_alter()
.
In 8.5.x and beyond, it is necessary to replace the user.toolbar_link_builder
service.
The attached patch implements both approaches.
It should theoretically be possible to decorate the service instead of replacing it (see
#2899392-42 β
). I had this code working, in fact, but I couldn't figure out how to decorate a non-existent service when I was running 8.4.x: I get Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "user.toolbar_link_builder". in /app/vendor/symfony/dependency-injection/ContainerBuilder.php:803
.
Needs work
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.