Multiple Site Accessibility With Specific Role

We Might have multiple site and multiple user.
Need to handle below functionality.

Site A-> Could be access by if the user has “ROLE-S1”
Site B-> Could be access by if the user has “ROLE-S2”

How we could proceed.?

Aske @aertmann wrote this piece about multi site restrictions

I believe it might solve your issue.


Thanks for the update.

However while applying the code , I am getting the exceptions.

Can you please let know the significance of “Acme.Package:Site.*” . Can you let me know the meaning of the “Acme” here . Is it Package Name or some keyword.

Abhishek Chaturvedi

What are the exceptions that you are referring to? Paste them here for better help :slight_smile:

Acme.Package is used as the Vendor.Package format in the example. You can replace that with your own package name, to avoid conflicts.

Can you let me know the exact location of the Policy.yaml file needed to be updated, as I can see in the Neos Project , there are multiple policy.yaml files at multiple locations.

Also For This piece of code


'Neos.Demo.Package:Site.Neos Demo Site':
  matcher: 'isType("Neos\Neos\Domain\Model\Site") && property("nodeName") == "Neos Demo Site"'

  matcher: 'isType("Neos\Neos\Domain\Model\Site") && property("nodeName") == "TestCMS"'

I am getting the following exception:-

You can define it in the Configuration/Policy.yaml file of your own package - then you have it separated from other packages code