backdrop-contrib / special_menu_items

Enables creating placeholder and separator menu items.
GNU General Public License v2.0
2 stars 3 forks source link

Parent text-only items always show even where child links all have restricted permissions #29

Open rtola-wpc opened 4 months ago

rtola-wpc commented 4 months ago

Expanded menu links of the type "text with no link" will show, even when their children all have restricted permissions to which the current user isn't granted access. Intuitively, if one doesn't have access to these child resources, I believe one shouldn't see the parent link.

Do you have plans to integrate this module with the core permissions system?

laryn commented 2 months ago

I have not made any plans in this regard. It's also somehow possible that people could want the nolink to still appear.

I'm curious if you could get away with a little fancy CSS. I haven't fully tested this, but something like:

ul.menu > li:has(> a.nolink):not(:has(> ul)) {
  display: none;
}
rtola-wpc commented 1 month ago

So sorry: I've only just seen this, having been away a while. I'll give this a try. It's a neat workaround. Thanks.