Server

How to Define Public Pages (Viewable by Anonymous Users)

Updated: December 17, 2024

To make some pages or parts of the repository visible to people without requiring them to be authenticated to the Platform, follow the following steps.

Activating the Anonymous User

The first step you need to take is to enable the anonymous user.

  1. Anonymous user needs to be registered through a configuration files, that should look like this:

    <?xml version="1.0"?>
    <component name="org.nuxeo.ecm.platform.login.anonymous.config">
      <!-- Add an Anonymous user -->
      <extension target="org.nuxeo.ecm.platform.usermanager.UserService"
        point="userManager">
        <userManager>
          <users>
            <anonymousUser id="Guest">
              <property name="firstName">Guest</property>
              <property name="lastName">User</property>
            </anonymousUser>
          </users>
        </userManager>
      </extension>
    </component>
    
    
    • This file needs to be named what-you-want-config.xml and to be deployed under nxserver/config/.
      Your filename must end with -config.xml to work properly.
    • Or you can use template system and copy it into template/common/config/.
    • Or you can add the extension element as an XML Extension in Nuxeo Studio.
  2. Modify nuxeo.conf and set nuxeo.user.anonymous.enable=true.
  3. Restart the application server.  After the server is up and running, when accessing Nuxeo again, the anonymous user will be used and logged into the application.

Managing Rights of the Anonymous User

The anonymous user after the configuration above is considered as a simple user with a given rights, a user workspace, etc. Managing his rights and visible actions is the same than other users.

If you give Write access to the repository to this user, you will let anyone have access to the server to create content.

Defining the Login Page for the Anonymous User

  • If you give at least Read Access to the Default Domain for the Anonymous User case, he will be redirected at the root of the Default Domain into the Nuxeo DM view.
  • If you give no Right Access to the Default Domain for the Anonymous User, he will be redirected to the Home View. Anonymous User will have the possibility to access to his content from the Dashboard (gadgets "My Workspace", "My Documents", ...)