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

AttributeEnumeration model calls break enrollment flow plugins

    XMLWordPrintable

Details

    Description

      Commit 1460d924189b861376f05a7880a3cfcc7f01603a, available for browsing at

      https://github.com/Internet2/comanage-registry/commit/1460d924189b861376f05a7880a3cfcc7f01603a

      introduced changes to a number of files in order to fix issues with AttributeEnumeration.

      In particular the commit added the model AttributeEnumeration in the $uses array() for the CoPetitionsController:

      // When using additional models, we must also specify our own
        public $uses = array(
          'CoPetition',
          'AttributeEnumeration',
          'CmpEnrollmentConfiguration',
          'OrgIdentitySource'
        );

      This allows code in the beforeRender() function such as

      $supportedEnumAttrs = $this->AttributeEnumeration->supportedAttrs();

      The problem is that most enrollment flow plugins will extend CoPetitionsController and so inherit the beforeRender() function. If the plugin has a controller and anything is rendered (such as a form to consume an email verification code) then when beforeRender() is called as part of the plugin execution then the variable $this refers to the name of plugin controller class and not CoPetitionsController, and hence

      $this->AttributeEnumeration

      resolves to null instead of the AttributeEnumeration class and a call to supportedAttrs() fails.

      Either the core code should load and then invoke the AttributeEnumeration model in some other way, or the documentation for Enrollment Flow Plugins at

      https://spaces.at.internet2.edu/display/COmanage/Enrollment+Flow+Plugins

       

      needs to be updated to include "AttributeEnumeration" in the $uses and additionally the 4.4.0 release notes at

      https://spaces.at.internet2.edu/display/COmanage/Upgrading+Registry+to+v4.4.0

      so that deployers know that 4.4.0 will break enrollment flows until the enrollment flow plugin is evolved.

      Attachments

        Activity

          People

            benn.oshrin@at.internet2.edu Benn Oshrin
            scott.koranda@at.internet2.edu Scott Koranda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: