Skip to content

Commit 83dcb5e

Browse files
author
Christian Fasching
committed
[Pimcore5 Migration] updated docs
1 parent 3012cbb commit 83dcb5e

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ A scenario to setup a role based permission system:
1313
- Additional data types for Pimcore objects
1414
- Permission Resource:
1515
- represents one specific user right (e.g. login)
16-
- can have values ```allow``` ```deny``` ```inherit```
16+
- can have values `allow` `deny` `inherit`
1717
- Permission Objects: Wrapper for default data type `objects` for recursive permission calculation.
1818
- Permission Href: Wrapper for default data type `href` for recursive permission calculation.
1919

20-
- Service for checking user rights based on a Pimcore object and a permission resource as service class ```Service``` with
20+
- Service for checking user rights based on a Pimcore object and a permission resource as service class `Service` with
2121
two methods:
22-
- ```Service::getPermissions```:
22+
- `Service::getPermissions`:
2323
- returns an array of all permissions for the given object, automatically merges all permission resources of objects related to the given object with 'Permission Objects' or 'Permission Href'.
2424
- merging: When permission is set to allow / deny directly in object, this is always used. Otherwise optimistic merging is used -> once one permission is allowed, it stays that way.
25-
- ```Service::isAllowed```: checks if given object is allowed for given resource
25+
- `Service::isAllowed`: checks if given object is allowed for given resource
2626

2727

2828

@@ -52,8 +52,12 @@ As a consequence, you can use Permission Resources in your access control config
5252
5353
### Integration with Pimcore navigation
5454
55-
To show/hide documents in navigation, you can assign Permission Resources as properties to Pimcore documents. A special
56-
navigation builder shipped by this bundle (`FrontendPermissionToolkitBundle\CoreExtensions\Navigation\Builder`)
55+
To show/hide documents in navigation, you can assign Permission Resources as properties to Pimcore documents.
56+
Just add a property named `permission_resource` with name name of the `permissionResource` as value to the document.
57+
58+
![Permission Property](doc/img/property.jpg)
59+
60+
A special navigation builder shipped by this bundle (`FrontendPermissionToolkitBundle\CoreExtensions\Navigation\Builder`)
5761
then can show/hide documents in navigation based on the permissions of the current user.
5862

5963
To do so, add following service definition to your application:

doc/img/property.jpg

26.4 KB
Loading

0 commit comments

Comments
 (0)