Message-ID: <931988457.3980.1485856060562.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3979_406298544.1485856060562" ------=_Part_3979_406298544.1485856060562 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html ParentOwnerLimitation

ParentOwnerLimitation

A limitation to specify that only users that owns all parent loc= ations of content gets a certain access right, used for content/creat= e permission.

Identifier ParentOwner
Value Class eZ\Publish\API\Repository\Values\User\Limi= tation\ParentOwnerLimitation
Type Class eZ\Publish\Core\Limitation\P= arentOwnerLimitationType
Criterion used n/a
Role Limitation no
Possible values
Value UI value Description

Only user which is owner of all parent locations gets access (see= "Legacy compatibility notes" #2)

2 "session"<= /span>

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

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

* Workaround for ParentOwner limitation on= user object (when user object is the parent of the content being created):=

To make sure user gets access to himself when using (Parent)Owner limita= tion across 4.x and 5.x, the solution is to change the user to be owner of = himself.
This is accomplished using a privileged user to do the followin= g API calls:

=20
$user =3D $userService->loadUser( $userId );
$contentMetadataUpdateStruct =3D $contentService->newContentMetadataUpda=
teStruct();
$contentMetadataUpdateStruct->ownerId =3D $user->id;
$contentService->updateContentMetadata( $user->getVersionInfo()->g=
etContentInfo(), $contentMetadataUpdateStruct );
=20
------=_Part_3979_406298544.1485856060562--