Skip to content
Other versions

Loading…

Configuring anonymous user

Follow these steps to configure:

  • Create a user named “public.”
  • Create a role named “ROLE_PUBLIC”.
  • Assign the role named “ROLE_USER” to this user.
  • Assign the role named “ROLE_PUBLIC” to this user.
  • Log in with the user “public” in the standard UI to check which nodes and options the user can access (this is mandatory to create the user’s trash folder, etc.).

Optional steps:

  • Create a profile for the “public” user. Disable all the features you consider the user should not have access to.

Finally, share the public autologin URL, which will be something like http://yourhost:8080/openkm/public/

Other usages:

In a multi-tenant installation, each tenant can have its own anonymous user. A user belongs to a single tenant, so every tenant uses a different user, named “public” followed by the tenant ID: “public2” for the tenant with ID 2, “public3” for the tenant with ID 3, etc.

The “public” user and its URL keep working as before for the main tenant. The configuration below is only needed for the other tenants.

Example of configuration for the tenant with ID 2:

  • Go to Administration > Tenants and check the Id of the tenant (2 in this example).
  • Change to the tenant (Menu -> tenant).
  • In Administration > Roles, use the Set a tenant for a role action on the “ROLE_PUBLIC” role and add the tenant 2, so the role is available in this tenant. A role can belong to several tenants.
  • Create a user named “public2”.
  • Assign the roles “ROLE_USER” and “ROLE_PUBLIC” to this user.
  • In Administration > Users, use the Set the user tenant action and check that only the tenant 2 is selected for this user.
  • Enable the option Properties > Document Properties > “Share Preview” in the profile used in the tenant 2. Optionally, create a specific profile for the “public2” user.
  • Log in with the user “public2” in the standard UI (this is mandatory to create the user’s trash folder, etc.).

To log in with the anonymous user of the tenant 2, add the tenant parameter to the public URLs: