Security Domains - js-lib-com/wood GitHub Wiki
By default all HTML pages are created into site root.
Enroll page/console page component into admin group.
- page/console/console.xml
<page>
<group>admin</group>
</page>
Enroll page/product page component into info group.
- page/product/product.xml
<page>
<group>info</group>
</page>
After declaring about groups into page component descriptors HTML pages are created into separated directories.
<webapp>
<security-constraint>
<web-resource-collection>
<web-resource-name>Editor pages</web-resource-name>
<url-pattern>/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>EDITOR</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Viewer pages</web-resource-name>
<url-pattern>/info/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>VIEWER</role-name>
</auth-constraint>
</security-constraint>
</webapp>
User roles definition depends on authorization implementation. Here is an example using tomcat-users.xml file.
<tomcat-users>
<role rolename="EDITOR"/>
<role rolename="VIEWER"/>
<user username="john" password="secret" roles="EDITOR" />
<user username="jane" password="secret" roles="VIEWER" />
</tomcat-users>
Work In Progress.