punktde/inspectorvisibility

Last activity on 8 August 2019
  • 3
  • 736
composer require punktde/inspectorvisibility

Neos package to configure the visibility of inspector elements using privileges

0.1.2

Neos package to configure the visibility of inspector elements using privileges

Version
0.1.2
Type
neos-package
Release Date
25.03.2019 15:04:42
Source
git
Distribution
zip
Requires
Requires (dev)
None
Suggest
None
Provides
None
Conflicts
None
Replaces
None
ee717ab0f31bd283ff75e8f158702b96e0c7428b

PunktDe.InspectorVisibility

Latest Stable Version Total Downloads

This package allows you to configure the visibility of inspector elements, like properties, groups and tabs using policies. With that you can configure the visibility of these elements according to the users roles.

CAUTION: Although this is done with policies, this is not a security feature!

If you prevent a user from editing nodes, you aditionally need to define policies with an EditNodePropertyPrivilege for example.

Installation

The installation is done with composer:

composer require punktde/inspectorvisibility

Usage

The matcher can be defined using standard eel. The following properties to match for are available:

  • nodeTypeName
  • tabName
  • groupName
  • propertyName

If no policy is matching for a role, the configured visibility is used. Same, if a permission is set to ABSTAIN.

Examples

Example Policy.yaml

privilegeTargets:

  'PunktDe\InspectorVisibility\Security\Authorization\Privilege\InspectorVisibilityPrivilege':
    'PunktDe.InspectorVisibility:AdminFields':
      matcher: "${tabName == 'meta' && groupName == 'nodeInfo'}"

roles:
  'Neos.Neos:Editor':
    privileges:
      -
        privilegeTarget: 'PunktDe.InspectorVisibility:AdminFields'
        permission: DENY

Matcher Examples

  • Adress all uriPathSegment properties: matcher: "${propertyName == 'uriPathSegment'}
  • Adress all meta tabs of all nodeTypes "${tabName == 'meta'}"
  • Address all title fields of a specific type matcher: "${nodeTypeName == 'Neos.Demo:Registration' && propertyName == 'title'}"
The content of the readme is provided by Github
The same vendor provides 32 package(s).