Not in a standard sense, i.e. the normal UI provided by Joomla. (Presuming you're talking about when an actual menu item is created here?) Extensions don't get a chance to run code when a menu item is created so, short answer: no.
I would normally suggest a plug-in but looking at com_menu
I can only see two JEventDispatcher
calls and they aren't very useful.
In /administrator/components/com_menus/models/menutypes.php
you have:
// Allow a system plugin to insert dynamic menu types to the list shown in menus:
JEventDispatcher::getInstance()->trigger('onAfterGetMenuTypeOptions', array(&$list, $this));
And in /administrator/components/com_menus/views/items/view.html.php
you have:
// Allow a system plugin to insert dynamic menu types to the list shown in menus:
JEventDispatcher::getInstance()->trigger('onBeforeRenderMenuItems', array($this));
Looking a layer deeper, the menu item class MenusModelItem extends JModelAdmin
the good thing here is that JModelAdmin
does trigger an onContentChangeState()
event which you could trap and dis-allow anyone try to set your view to published if the user group is wrong.
Having said that, I wouldn't be doing that. Menu's are just paths and easy to guess in our SEO/SEF world. The right place to do it is in the component/view itself, rejecting anyone that isn't in the right group. You can do this either silently bouncing users back to the home page or throw a 404
.