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

[PAPI] UserService::createUser $parentGroups parameter doesn't verify if the contents are actually UserGroup's

    XMLWordPrintable

Details

    Description

      As mentioned on the related issue about UserService::loadUserGroup we can load any kind of content.
      Here also, we can directly assign any kind of content objects to the created user

      Steps

      1. go to the admin interface
      2. create a folder and get it's object ID (<folder-id>)
      3. create an image and get it's object ID (<image-id>)
      4. load the content objects using public API
            $userCreateStruct = // make a valid user create struct
            $parentGroups = array();
            $parentGroups[] = $contentService->loadContent( <folder-id> );
            $parentGroups[] = $contentService->loadContent( <image-id> );
            $userService->createUser( $userCreateStruct, $parentGroups );
        
      5. Verify no exception was thrown
      6. Verify that on the created folder the user is shown
      7. Verify that on the created image (non-container) the user is not shown

      Attachments

        Activity

          People

            Unassigned Unassigned
            marcos.loureiro-obsolete@ez.no Marcos Loureiro (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: