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

ParentOwnerLimitation

=20
=20
=20
=20

A Limitation to specify that only the Users who owns all parent Location= s of a Content item gets a certain access right, used for content/cre= ate permission.

Id= entifier ParentOwner
Va= lue 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
1 "self"

Only the User who is the owner of all parent = Locations gets access

2 "session"

Same as "self"

Legacy compatibil= ity notes
  1. "session" is deprecated and works exactly like "self" in Public API sin= ce it has no knowledge of user Sessions
  2. User is no longer auto assumed to be owner of himself and get access cr= eate children of own user content object when Owner limitation= is used in Public API

Workaround 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)Owner= Limitation 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 cal= ls:

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

 

 

=20
=20
=20
=20

 

=20
=20
=20
------=_Part_3833_1798851813.1485855524499--