d3web-KnowWE - change user rights for KnowWE.#
When working in larger groups, it might be necessary to restrict user access to wikipages. This can be done on each wikipage individually, but yields problems like maintainance issues or excessive editing.A better solution would be to create wiki specific user groups an define access rules.
The access rules are defined in the policy file webapps/KnowWE/WEB-INF/jspwiki.policy. Which file is used is set by jspwiki.policy.file in WEB-INF/classes/jspwiki-custom.properties (relative to the folder WEB-INF or absolute). The distribution ships these variants:
- jspwiki.policy (default): everyone may view, edit, rename and delete pages. Only suitable for a local installation.
- jspwiki-readonly.policy: everyone may read, logged-in users edit.
- jspwiki-authonly.policy: only logged-in users read and edit.
- jspwiki-authonly-roles.policy: logged-in users read, members of the wiki group Editor edit.
For own rules, grant permissions to a wiki group, e.g. a group myUserGroup created in the wiki (NewGroup.jsp):
grant principal org.apache.wiki.auth.GroupPrincipal "myUserGroup" {
permission org.apache.wiki.auth.permissions.PagePermission "*:*", "modify,rename";
permission org.apache.wiki.auth.permissions.GroupPermission "*:*", "view";
permission org.apache.wiki.auth.permissions.WikiPermission "*", "createPages";
};
Restart the server after changing the policy. Details: JSPWiki security documentation
.