General

  eZ Systems Website
  Technical documentation
  Editor documentation

This Documentation contains:
 
Technical documentation:



⚠ WARNING ! This documentation is deprecated !

Please go to the current Technical Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A limitation Limitation to specify that only users that the Users who owns all parent locations Locations of content a Content item gets a certain access right, used for content/create permission.

IdentifierParentOwner
Value ClasseZ\Publish\API\Repository\Values\User\Limitation\ParentOwnerLimitation
Type ClasseZ\Publish\Core\Limitation\ParentOwnerLimitationType
Criterion usedn/a
Role Limitationno
Possible values
user which locations gets access (see "Legacy compatibility notes" #2)
ValueUI valueDescription
1"self"

Only

the User who is the owner of all parent

Locations gets access

2"session"

Same as "self" (see "Legacy compatibility notes" #1)

Legacy compatibility notes:

...

Legacy compatibility notes
  1. "session" ) is deprecated and works exactly like "self" in Public API since it has no knowledge of user Sessions
  2. User is no longer auto assumed to be owner of himself and get access create children of own user content object when Owner limitation is used in Public API*

...

Info
titleWorkaround for the ParentOwner

...

Limitation on

...

Users (when

...

a User is the parent of the content being created)

...

To make sure

...

the User gets access to

...

themselves when using (Parent)

...

OwnerLimitation across 4.x and 5.x, the solution is to change the

...

User to be the owner of

...

their own Content item.

This is accomplished using a privileged user to do the following API calls:

Code Block
languagephp
$user = $userService->loadUser( $userId );
$contentMetadataUpdateStruct = $contentService->newContentMetadataUpdateStruct();
$contentMetadataUpdateStruct->ownerId = $user->id;
$contentService->updateContentMetadata( $user->getVersionInfo()->getContentInfo(), $contentMetadataUpdateStruct );