Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/content_management/data_migration/importing_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@
A role requires the `identifier` metadata key.

For each policy assigned to the role, you select the module and function, with optional limitations.
For the identifiers and values of available limitations, see [Limitation reference](limitation_reference.md).

Check warning on line 276 in docs/content_management/data_migration/importing_data.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/content_management/data_migration/importing_data.md#L276 <Ibexa.DontCapitalize>

Don't capitalize 'Limitation' if inside the sentence.
Raw output
{"message":"Don't capitalize 'Limitation' if inside the sentence.","location":{"path":"docs/content_management/data_migration/importing_data.md","range":{"start":{"line":276,"column":63},"end":{"line":276,"column":73}}},"severity":"WARNING","code":{"value":"Ibexa.DontCapitalize"}}

The following example shows the creation of a `Contributor` role:

Expand Down
84 changes: 67 additions & 17 deletions docs/permissions/limitation_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

# Limitation reference

The name of each limitation is followed by its identifier, for example, `Class` for the content type limitation.

Check notice on line 9 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L9 <Ibexa.Passive>

Try to avoid passive tense, when possible.
Raw output
{"message":"Try to avoid passive tense, when possible.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":9,"column":29},"end":{"line":9,"column":40}}},"severity":"INFO","code":{"value":"Ibexa.Passive"}}
Use this identifier to refer to the limitation in [data migrations](importing_data.md#roles).
Unless stated otherwise, data migrations accept the same limitation values as listed in the "Possible values" tables.

To check how the limitations of an existing role are represented in a migration file, [export the role](exporting_data.md).

Check notice on line 13 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L13 <Ibexa.Passive>

Try to avoid passive tense, when possible.
Raw output
{"message":"Try to avoid passive tense, when possible.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":13,"column":50},"end":{"line":13,"column":65}}},"severity":"INFO","code":{"value":"Ibexa.Passive"}}

## Blocking limitation

A generic limitation type to use when no other limitation has been implemented.
Expand Down Expand Up @@ -38,7 +44,7 @@

## Activity log Owner limitation

The Activity log Owner (`ActivityLogOwner`) limitation specifies if a user can see only their own [recent activity](recent_activity.md) log entries, and not entries from other users.
The Activity log Owner (`activity_log_owner`) limitation specifies if a user can see only their own [recent activity](recent_activity.md) log entries, and not entries from other users.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


| Value | UI value | Description |
|-------|-----------------|--------------------------------------------------------------|
Expand Down Expand Up @@ -71,7 +77,7 @@

### Collaborative editing Owner limitation

The Owner limitation specifies whose drafts the user can share.
The Owner (`share_owner`) limitation specifies whose drafts the user can share.
If not specified, user can share:

- their drafts
Expand All @@ -85,7 +91,7 @@

### Collaborative editing Scope limitation

The Scope limitation specifies whether the user can share the preview and editing view with other users.
The Scope (`share_scope`) limitation specifies whether the user can share the preview and editing view with other users.

#### Possible values

Expand All @@ -96,14 +102,14 @@

### Collaborative editing PublicLink limitation

The Public Link (`PublicLink`) limitation specifies whether the user can manage the settings of the shareable preview link.
The Public Link (`share_public_link`) limitation specifies whether the user can manage the settings of the shareable preview link.

#### Possible values

|Value|UI value|Description|
|------|------|------|
|"Off"|"off"| User can't manage the settings|
|"On"|"on"| User can manage the settings|
|"off"|"off"| User can't manage the settings|
|"on"|"on"| User can manage the settings|

## Discount Owner limitation [[% include 'snippets/lts-update_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]]

Expand All @@ -117,7 +123,7 @@

## Content type Group limitation

The Content Type Group (`UserGroup`) limitation specifies that only users with at least one common *direct* user group with the owner of content get the selected access right.
The Content Type Group (`Group`) limitation specifies that only users with at least one common *direct* user group with the owner of content get the selected access right.

Check warning on line 126 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L126 <Ibexa.DontCapitalize>

Don't capitalize 'Content Type' if inside the sentence.
Raw output
{"message":"Don't capitalize 'Content Type' if inside the sentence.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":126,"column":5},"end":{"line":126,"column":17}}},"severity":"WARNING","code":{"value":"Ibexa.DontCapitalize"}}

### Possible values

Expand All @@ -127,7 +133,7 @@

## Content type Group of Parent limitation

The Content Type Group of Parent (`ParentUserGroupLimitation`) limitation specifies that only Users with at least one common *direct* user group with the owner of the parent location of a content item get a certain access right, used by `content/create` permission.
The Content Type Group of Parent (`ParentGroup`) limitation specifies that only Users with at least one common *direct* user group with the owner of the parent location of a content item get a certain access right, used by `content/create` permission.

Check notice on line 136 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L136 <Ibexa.SentenceLength>

Keep your sentences to less than 30 words.
Raw output
{"message":"Keep your sentences to less than 30 words.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":136,"column":1},"end":{"line":136,"column":4}}},"severity":"INFO","code":{"value":"Ibexa.SentenceLength"}}

Check warning on line 136 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L136 <Ibexa.DontCapitalize>

Don't capitalize 'Content Type' if inside the sentence.
Raw output
{"message":"Don't capitalize 'Content Type' if inside the sentence.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":136,"column":5},"end":{"line":136,"column":17}}},"severity":"WARNING","code":{"value":"Ibexa.DontCapitalize"}}

### Possible values

Expand All @@ -137,19 +143,30 @@

## Content type limitation

The Content Type (`ContentType`) limitation specifies whether the user has access to content with a specific content type.
The Content Type (`Class`) limitation specifies whether the user has access to content with a specific content type.

Check warning on line 146 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L146 <Ibexa.DontCapitalize>

Don't capitalize 'Content Type' if inside the sentence.
Raw output
{"message":"Don't capitalize 'Content Type' if inside the sentence.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":146,"column":5},"end":{"line":146,"column":17}}},"severity":"WARNING","code":{"value":"Ibexa.DontCapitalize"}}

### Possible values

|Value|UI value|Description|
|------|------|------|
|`<ContentType_id>`|`<ContentType_name>`|All valid content type IDs can be set as value(s)|

### Data migrations

In [data migrations](importing_data.md#roles), use content type identifiers instead of IDs, for example:

``` yaml
limitations:
-

Check notice on line 160 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L160 <Ibexa.Lists>

Verify list formatting: Full sentences should start with uppercase and end with a period. Sentence fragments should start with lowercase and have no period.
Raw output
{"message":"Verify list formatting: Full sentences should start with uppercase and end with a period. Sentence fragments should start with lowercase and have no period.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":160,"column":1},"end":{"line":160,"column":26}}},"severity":"INFO","code":{"value":"Ibexa.Lists"}}
identifier: Class
values: [folder, article]
```

## Content type of Parent limitation

The Content Type of Parent (`ParentContentType`) limitation specifies whether the user has access to content whose parent location contains a specific content type, used by `content/create`.
The Content Type of Parent (`ParentClass`) limitation specifies whether the user has access to content whose parent location contains a specific content type, used by `content/create`.

Check warning on line 167 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L167 <Ibexa.DontCapitalize>

Don't capitalize 'Content Type' if inside the sentence.
Raw output
{"message":"Don't capitalize 'Content Type' if inside the sentence.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":167,"column":5},"end":{"line":167,"column":17}}},"severity":"WARNING","code":{"value":"Ibexa.DontCapitalize"}}

This limitation combined with `ContentType` limitation allows you to define business rules like allowing users to create "Blog Post" within a "Blog."
This limitation combined with `Class` limitation allows you to define business rules like allowing users to create "Blog Post" within a "Blog."
If you also combine it with `Owner of Parent` limitation, you effectively limit access to create Blog Posts in the users' own Blogs.

### Possible values
Expand All @@ -158,6 +175,17 @@
|------|------|------|
|`<ContentType_id>`|`<ContentType_name>`|All valid content type IDs can be set as value(s)|

### Data migrations

In [data migrations](importing_data.md#roles), you can use content type identifiers or IDs, for example:

``` yaml
limitations:
-

Check notice on line 184 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L184 <Ibexa.Lists>

Verify list formatting: Full sentences should start with uppercase and end with a period. Sentence fragments should start with lowercase and have no period.
Raw output
{"message":"Verify list formatting: Full sentences should start with uppercase and end with a period. Sentence fragments should start with lowercase and have no period.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":184,"column":1},"end":{"line":184,"column":26}}},"severity":"INFO","code":{"value":"Ibexa.Lists"}}
identifier: ParentClass
values: [folder, article]
```

## Field Group limitation [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]]

A Field Group (`FieldGroup`) limitation specifies whether the user can work with content fields belonging to a specific group.
Expand Down Expand Up @@ -189,7 +217,7 @@

## Location limitation

A location (`Location`) limitation specifies whether the user has access to content with a specific location, in case of `content/create` the parent location is evaluated.
A location (`Node`) limitation specifies whether the user has access to content with a specific location, in case of `content/create` the parent location is evaluated.

Check notice on line 220 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L220 <Ibexa.Passive>

Try to avoid passive tense, when possible.
Raw output
{"message":"Try to avoid passive tense, when possible.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":220,"column":155},"end":{"line":220,"column":167}}},"severity":"INFO","code":{"value":"Ibexa.Passive"}}

### Possible values

Expand All @@ -207,11 +235,11 @@

|Value|UI value|Description|
|------|------|------|
|`<Session_id>`|`<Session_name>`|All valid session IDs can be set as value(s)|
|`<Section_id>`|`<Section_name>`|All valid section IDs can be set as value(s)|

## New State limitation

A New State (`NewObjectState`) limitation specifies whether the user has access to (assigning) a given object state to content.
A New State (`NewState`) limitation specifies whether the user has access to (assigning) a given object state to content.

In the `state/assign` policy you can combine this with State limitation to limit both from and to values.

Expand All @@ -223,7 +251,7 @@

## Object State limitation

The Object State (`ObjectState`) limitation specifies whether the user has access to content with a specific object state.
The Object State (`State`) limitation specifies whether the user has access to content with a specific object state.

### Possible values

Expand Down Expand Up @@ -292,7 +320,7 @@

|Value|UI value|Description|
|------|------|------|
|`<ContentType_id>`|`<ContentType_name>`|All valid content type IDs can be set as value(s)|
|`<ProductType_identifier>`|`<ProductType_name>`|All valid product type identifiers can be set as value(s)|

## Section limitation

Expand All @@ -304,7 +332,18 @@

|Value|UI value|Description|
|------|------|------|
|`<Session_id>`|`<Session_name>`|All valid session IDs can be set as value(s)|
|`<Section_id>`|`<Section_name>`|All valid section IDs can be set as value(s)|

### Data migrations

In [data migrations](importing_data.md#roles), you can use section identifiers or IDs, for example:

``` yaml
limitations:
-

Check notice on line 343 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L343 <Ibexa.Lists>

Verify list formatting: Full sentences should start with uppercase and end with a period. Sentence fragments should start with lowercase and have no period.
Raw output
{"message":"Verify list formatting: Full sentences should start with uppercase and end with a period. Sentence fragments should start with lowercase and have no period.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":343,"column":1},"end":{"line":343,"column":26}}},"severity":"INFO","code":{"value":"Ibexa.Lists"}}
identifier: Section
values: [standard, media]
```

## Segment group limitation [[% include 'snippets/experience_badge.md' %]] [[% include 'snippets/commerce_badge.md' %]]

Expand All @@ -328,6 +367,17 @@
|------|------|------|
|`<siteaccess_hash>`|`<siteaccess_name>`|Hash is calculated in the following way in legacy in default 64bit mode: `sprintf( '%u', crc32( $siteAccessName ) )`|

### Data migrations

In [data migrations](importing_data.md#roles), use SiteAccess names instead of hashes, for example:

``` yaml
limitations:
-

Check notice on line 376 in docs/permissions/limitation_reference.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/permissions/limitation_reference.md#L376 <Ibexa.Lists>

Verify list formatting: Full sentences should start with uppercase and end with a period. Sentence fragments should start with lowercase and have no period.
Raw output
{"message":"Verify list formatting: Full sentences should start with uppercase and end with a period. Sentence fragments should start with lowercase and have no period.","location":{"path":"docs/permissions/limitation_reference.md","range":{"start":{"line":376,"column":1},"end":{"line":376,"column":26}}},"severity":"INFO","code":{"value":"Ibexa.Lists"}}
identifier: SiteAccess
values: [site]
```

### Legacy compatibility notes

`SiteAccess` limitation is deprecated and isn't used actively in public PHP API, but is allowed for being able to read / create limitations for legacy.
Expand Down
Loading