Example Protected NodeType

A secured area can sometimes be very useful. In this example you will see how to allow a NodeType (used as a page in this case) for a specific user role only. Of course, instead of a whole page you can use a specific NodeType which may contain a content collection. In this way you could make public NodeTypes available only for a certain user group.

It is super simple and realized in one file.

privilegeTargets:
  'Neos\ContentRepository\Security\Authorization\Privilege\Node\ReadNodePrivilege':
    'Arsors.Neos:ProtectedPage':
      matcher: 'nodeIsOfType("Arsors.Neos:ProtectedPage")'

roles:
  'Neos.Neos:Administrator':
    privileges:
      -
        privilegeTarget: 'Arsors.Neos:ProtectedPage'
        permission: GRANT
Last cache from 2021-05-15 at 20:38:43 (Example Eel Helper)