I currently migrating from old CUG to new and stumbled with the following problem:
in the previous version, we could add property cq:cugPrincipals to the page template, and all pages created with this template will have this CUG by default. But in the new version, we have to use rep:CugPolicy node with rep:principalNames properties for this. I create this node under the page template and create a page with this template but it does not appear in the page structure and the page doesn`t have configured CUG by default. Does it even possible with the new CUG approach? Maybe I miss something?
Topics help categorize Community content and increase your ability to discover relevant content.
In general CUG group is added to the root page of a hierarchy and then it gets inherited to children pages. Why do you want to set it an individual page if you can set it on the root page of the hierarchy once ? If your requirement is that there should be a default value set then you can get that default from the root node and there is no need to define at the template level.
Thanks, but unfortunately we have the opposite architecture. And CUG protected pages will be at the end of the nodes hierarchy. For example, we have something similar to the following structure
..... and so on
So on the confirmation page, you can get it only after submitting the corresponding form. But all this "confirmationPages" has the same template so it`s convenient to use CUG in template how it was before
Okay I understand. I think it may be a limitation of editable templates. You may add the default CUG to the page programmatically either on creation or on publish.
I think you need to create a node rep:cugPolicy (same jcr:primaryType and a property with rep:principalNames) and the parent node should have jcr:mixinTypes property, if you're using static templates.
In case you've added cug through Initial Page Properties in the editable template and it doesn't show up in the content/ page, a possible reason could be that rep:cugPolicy node is getting created directly under the 'initial' node and not under 'root' node and the page is created, it only copies the nodes under 'root' node and leave other nodes. If this is the case, you may want to check with Adobe support.