fix(discussion): no longer show entity menu items on non-discussions

A bug in the discussion menu hook could cause discussion edit
links to show on other entities like users.

Fixes #6508