Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-2312

menuUser.ctp assumes plugin will only link to itself

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            arlen.johnson@at.internet2.edu Arlen Johnson (google.com)
            scott.koranda@at.internet2.edu Scott Koranda (uwm.edu/illinois.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: