General

  eZ Systems Website
  Editor documentation


  Developer documentation

  Back to the top

The documentation is moving!

We're moving our developer docs to Github and a new site.
The migration is still in progress, so please contact us in #documentation-contrib on eZ Community Slack if you have any questions or feedback.

This space will not be updated from now on except for critical fixes.

Skip to end of metadata
Go to start of metadata

A Limitation to specify that only the owner of the Content item gets a certain access right.

IdentifierOwner
Value ClasseZ\Publish\API\Repository\Values\User\Limitation\OwnerLimitation
Type ClasseZ\Publish\Core\Limitation\OwnerLimitationType
Criterion usedeZ\Publish\API\Repository\Values\Content\Query\Criterion\UserMetadata( UserMetadata::OWNER )
Role Limitationno
Possible values
ValueUI valueDescription
1"self"

Only the User who is the owner gets access

2"session"

Same as "self"

Legacy compatibility notes:
  1. "session" is deprecated and works exactly like "self" in Public API since it has no knowledge of user Sessions
  2. A User is no longer automatically assumed to be the owner of themselves and gets access to edit themselves when the Owner limitation is used in Public API

Workaround for the OwnerLimitation on Users

To make sure the User gets access to themselves when using 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: