<?xml version='1.0' encoding='UTF-8'?>
<module version="1.0">

  <application>
      <locale-config>
          <default-locale>en</default-locale>
          <supported-locale>en</supported-locale>
          <supported-locale>fr</supported-locale>
      </locale-config>
      <message-bundle var='atlasMsg'>atlas</message-bundle>
  </application>

    <!--  When a user is created, send him a welcome message.  -->
    <on-event name="user-create">
       <action>#{userMail.send}</action>
       <property name="template">/mail/welcome-message.xhtml</property>
    </on-event>

  <grant-permission>
    <name>anonymous</name>
  </grant-permission>

  <auth-permission>
    <name>logged-user</name>
  </auth-permission>

  <error-page>
    <error-code>403</error-code>
    <location>/errors/403.html</location>
  </error-page>

  <error-page>
    <error-code>404</error-code>
    <location>/errors/404.html</location>
  </error-page>

  <error-page>
    <error-code>500</error-code>
    <location>/errors/500.html</location>
  </error-page>

</module>

<?xml version='1.0' encoding='UTF-8'?>
<module version="1.0">

  <application>
      <locale-config>
          <default-locale>en</default-locale>
          <supported-locale>en</supported-locale>
          <supported-locale>fr</supported-locale>
      </locale-config>
      <message-bundle var='atlasMsg'>atlas</message-bundle>
  </application>

    <!--  When a user is created, send him a welcome message.  -->
    <on-event name="user-create">
       <action>#{userMail.send}</action>
       <property name="template">/mail/welcome-message.xhtml</property>
    </on-event>

  <grant-permission>
    <name>anonymous</name>
  </grant-permission>

  <auth-permission>
    <name>logged-user</name>
  </auth-permission>

  <error-page>
    <error-code>401</error-code>
    <location>/errors/401.html</location>
  </error-page>

  <error-page>
    <error-code>403</error-code>
    <location>/errors/403.html</location>
  </error-page>

  <error-page>
    <error-code>404</error-code>
    <location>/errors/404.html</location>
  </error-page>

  <error-page>
    <error-code>500</error-code>
    <location>/errors/500.html</location>
  </error-page>
  
    <url-policy>
        <description>
           Security rule to allow only logged users to post micro blogs.
        </description>
        <permission>anonymous</permission>
        <url-pattern>/errors/.*</url-pattern>
    </url-policy>

</module>

Add permissions for error pages
Add permissions for error pages
