Limitations
Intro
Limitations are the building blocks of the permission system in 5.x, they provide the limitations you can apply to a given access right to limit the right to certain conditions.
Limitations consists of two parts:
- Limitation (Value)
- LimitationType
Certain limitations are also "RoleLimitations", meaning they can be used to limit the rights of a Role assignment, this is currently Subtree and Section limitation.
The Limitation represent the value, while LimitationType deals with the business logic surrounding how it actually works and is enforced.
LimitationTypes have two modes of operation in regards to permission logic (see eZ\Publish\SPI\Limitation\Type interface for more info):
| Method | Used when |
| evaluate | Evaluating if user has access to a given object in a certain context (for instance a context can be Locations when object is Content), under the condition of the Limitation value(s) |
|---|---|
| getCriterion | Generates a Criterion using Limitation value and current user which SearchService by default applies to search criteria for filtering search based on permissions |
List of Limitations
In this section
- ContentTypeLimitation A limitation to specify if user has access to Content with a specific ContentType.
- LanguageLimitation A limitation to specify if user has access to Content with a specific language.
- LocationLimitation A limitation to specify if user has access to Content with a specific location, in case of content/create the parent location is evaluated.
- NewSectionLimitation A limitation to specify if user has access to (assign) a given Section (to Content).
- ObjectStateLimitation Legacy StateGroup
- OwnerLimitation A limitation to specify that only owner of content gets a certain access right.
- ParentContentTypeLimitation A limitation to specify if user has access to Content where parent locations is of specific ContentType, used by content/create.
- ParentDepthLimitation A limitation to specify if user has access to Content with a specific within a specific depth of the parent location, used for content/create permission.
- ParentOwnerLimitation A limitation to specify that only users that owns all parent locations of content gets a certain access right, used for content/create permission.
- ParentUserGroupLimitation A limitation to specify that only users with at least one common direct user group with owner of parent location of content gets a certain access right, used by content/create permission.
- SectionLimitation A limitation to specify if user has access to Content with a specific section.
- SiteAccessLimitation A limitation to specify in which siteaccesses a certain permission applies, used by user/login.
- SubtreeLimitation A limitation to specify if user has access to Content within a specific Subtree, in case of content/create the parent Subtree is evaluated.
- UserGroupLimitation A limitation to specify that only users with at least one common direct user group with owner of content gets a certain access right.
Contributors
- Ricardo Correia Updated
Comments
Add a comment