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

Could not find 'Limitation' with identifier 'Group'

    XMLWordPrintable

Details

    Description

      roleService -> loadRoleByIdentifier( $roleIdentifier ) fails with the exception Could not find 'Limitation' with identifier 'Group' if UserGroup limitation is used in role.

      steps to reproduce
      • create a role and include the policy content | read | group:self
      • attempt to load the role by it's identifier in a command
              $repository = $this->getContainer()->get( 'ezpublish.api.repository' );
              $repository->setCurrentUser( $repository->getUserService()->loadUser( 14 ) );
              $roleService = $repository->getRoleService();
        
              if ( !$role = $roleService->loadRoleByIdentifier( $roleIdentifier ) )
              {
                  $output->writeln( "Role $roleIdentifier not found" );
                  exit;
              }
        

        The command will fail with

        [eZ\Publish\Core\Base\Exceptions\NotFoundException]
        Could not find 'Limitation' with identifier 'Group'

      I believe the limitation is named UserGroup

      Attachments

        Activity

          People

            Unassigned Unassigned
            joaquim.cavalleri-obsolete@ez.no Joaquim Cavalleri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: