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

OwnerLimitation

A limitation to specify that only owner of content gets a certai= n access right.

Identifier Owner
Value Class eZ\Publish\API\Repository\Values\User\Limi= tation\OwnerLimitation
Type Class eZ\Publish\Core\Limitation\O= wnerLimitationType
Criterion used eZ\Publish\API\Repository\Va= lues\Content\Query\Criterion\UserMetadata( UserMetadata::OWNER )
Role Limitation no
Possible values
Value UI value Description

Only user which is owner gets access (see "Legacy compat= ibility 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 longer auto assumed to be owner of himself and get acc= ess to edit him/herself when Owner limitation is used in Public API= *

* Workaround for Owner limitation on user object:

To make sure user gets access to himself when using Owner limitation acr= oss 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 following API ca= lls:

=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_4383_738530384.1485866345908--