Configuring the anonymous user
Behind the anonymous user, there's a standard user named "public," which automatically logs in to the application using a unique URL.
This feature must be enabled in the user profile with the option at Properties > Document Properties > "Share Preview."
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.).
The "public" user must have READ access to the main root nodes (okm:root, okm:templates, etc.).
The share preview option will only allow the document node type with "ROLE_PUBLIC" read access.
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/
In case you want to log out the public user, please use a URL like http://yourhost:8080/openkm/kcenter/#/logout
Other usages:
- Share a specific document link http://yourhost:8080/openkm/public/uuid (where the uuid is the UUID of the node)
- Share a specific document preview link http://yourhost:8080/openkm/public/preview/uuid (where the uuid is the UUID of the document)