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

API Exception when having comment policy with limitation

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 5.2-dev, 5.2-rc1, 5.3.3, 5.4.0-beta1

    Description

      Hi,

      Having an ezwebin installation, if we add a policy "comments->delete->CommentCreator( Self )" to editor's role, and then login with an editor's user, when we access some object (for instance, a folder), we have the following exception on apache log:

      [Tue Oct 22 10:14:28 2013] [error] [client 192.168.2.21] PHP Fatal error:  Uncaught exception 'eZ\\Publish\\Core\\Base\\Exceptions\\NotFoundException' with message 'Could not find 'Limitation' with identifier 'CommentCreator'' in /var/www/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/RoleService.php:908\nStack trace:\n#0 /var/www/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/RoleService.php(816): eZ\\Publish\\Core\\Repository\\RoleService->getLimitationType('CommentCreator')\n#1 /var/www/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/RoleService.php(788): eZ\\Publish\\Core\\Repository\\RoleService->buildDomainPolicyObject(Object(eZ\\Publish\\SPI\\Persistence\\User\\Policy), Object(eZ\\Publish\\SPI\\Persistence\\User\\Role))\n#2 /var/www/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/RoleService.php(361): eZ\\Publish\\Core\\Repository\\RoleService->buildDomainRoleObject(Object(eZ\\Publish\\SPI\\Persistence\\User\\Role))\n#3 /var/www/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/RoleService.php( in /var/www/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/RoleService.php on line 908, referer: http://ezp5.dev.vagrant/News/Article-with-commnets-for-testing
      

      To reproduce:

      • Install ezpublish with ezwebin without content
      • Install and activate ezcomments extension
        As admin user:
      • Create a class with 'comments' attribute
      • create a "news" folder and within this folder, an object of the previous defined class
      • Update Editor's role to include the policy "comment : delete : CommentCreator( Self ) "
        As Editor's user:
      • Access ezwebin_site frontend
      • click on "News" folder
        The exception happens when we click the "News" folder

      Aditional notes:
      Note1: The exception happens both in Mysql and PostgreSQL
      Note2: The exception do not happen if we use a legacy access to our site

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulo.nunes-obsolete@ez.no Paulo Nunes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: