Details
-
Improvement
-
Resolution: Fixed
-
Major
-
COmanage Registry 4.0.1 (Purple Jade MR1)
Description
The file app/View/Elements/menuUser.ctp has code like this:
$args = $menuContent['plugins'][$plugin]['coperson'][$label];
$args[] = 'copersonid:' . $co['co_person_id'];
$args['plugin'] = Inflector::underscore($plugin);
print '<li>' . $this->Html->link($co['co_name'], $args) . "</li>\n";
So even if the plugin developer has explicitly set 'plugin' in the array to be some other plugin like the KdcAuthenticator, e.g.
array(
'plugin' => "kdc_authenticator",
'controller' => "kdcs",
'action' => "manage",
'authenticatorid' => "2")
)
then the code above will overwrite the plugin developer's choice for 'plugin'.
The effect is that a plugin may only have menu links into itself or core code, but not other plugins.
The code should allow the plugin developer to specify a plugin. It could, for example, test to see if $args['plugin'] is already set and if so do not override it.