Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-9092

Policy limitations cannot recieve values from extension

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.8.7, 3.9.0rc2
    • None
    • Misc
    • None
    • Version: 3.x
      PHP Version: not relevant
      Webserver: not relevant
      Database: not relevant

    Description

      Currently extensions are not able to supply the policy system with own limitation lists over class functions because the instanciation is limited to 'kernel/'.

      Thats makes it unusable or at least unclean for extensions.

      I've attached a patch for 3.7.3. Should fit to newer versions as well. I've introduced a new array value to give the extension. Otherwise it will fallback to kernel for backwards compatibility.

      Useage example:

      $myLimitationValues = array(
           'name'=> 'MyLimitations',
           'extension' => 'mycoolextension',
           'values'=> array(),
           'path' => 'classes/',
           'file' => 'mycoolclass.php',
           'class' => 'coolclass',
           'function' => 'fetchList',
           'parameter' => array( false )
      );
      
      $FunctionList['mymodulefunction'] = array( 'mylimitations' => $myLimitations );
      

      Patching of 3 files was needed because of code duplication.

      Attachments

        Activity

          People

            a29ca475-2ac3-469b-95ea-e37ca79eae29@accounts.ibexa.co Sergiy Pushchin
            tos tos
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: