<?xml version="1.0" encoding="utf-8"?>
<s1 title="HelpOnGroups"><p><p></p>
<s2 id="Groups" title="Groups">
<p><p>Contents</p>
<ol><li>
<link anchor="G">Groups</link><ol><li>
<link anchor="W">Wiki Groups</link><ol><li>
<link anchor="D">Defining</link></li>
<li>
<link anchor="U">Usage</link></li>
<li>
<link anchor="P">Protecting them</link></li>
<li>
<link anchor="U-1">Using groups within groups</link></li>
</ol>
</li>
<li>
<link anchor="O">Other ways to define groups / access group definitions</link></li>
</ol>
</li>
</ol>
<p> A group is a simple data structure that maps a group name to a set of group member names. It can be used e.g. within ACL definitions to specify groups of users. </p>
<p>The group name usually is something like <code>EditorGroup</code> (some word ending with <code>Group</code>). This default pattern can be changed (e.g. for non-english languages etc.), see page_group_regex on <jump href="/wiki/HelpOnConfiguration">HelpOnConfiguration</jump>. </p>
<p>The group members are just arbitrary names (unicode strings). Note that groups are not limited to <em>user</em> names, you can also define a group of your favourite wiki pages (but you would need some code that uses that group in a somehow useful way). </p>
<p></p>
<s3 id="Wiki Groups" title="Wiki Groups">
<p></p>
<s4 id="Defining" title="Defining">
<p>You can create a group definition for a group named <code>EditorGroup</code> by creating a page called <code>EditorGroup</code> with this content: </p>
<p></p>
<source><![CDATA[#format wiki
These are people that are trusted to edit pages on this wiki:
 * JaneDoe
  * this is ignored
 * JoeDoe
 * [[John Smith]]]]></source><p>Important: </p>
<ul><li>Group members have to be on an unordered first-level list. </li>
<li>If link markup is used, the link target will be added as member. Please only use rather simple link markup. </li>
<li>Everything else (other text, second-level items, etc.) is ignored. </li>
<li><p>You have to explicitly <em>use</em> the group (there are no hardcoded group names in moin), see below. </p>
</li>
</ul>
<p></p>
</s4>
<s4 id="Usage" title="Usage">
<p>Use groups to define permissions for those users on your wiki (see <jump href="/wiki/HelpOnAccessControlLists">HelpOnAccessControlLists</jump>).   </p>
<p>For example, you could have this in your wiki config: </p>
<source><![CDATA[    acl_rights_default = u'EditorGroup:read,write,delete,revert All:read']]></source><p>Of course you can also use the group in on-page ACLs: </p>
<p></p>
<source><![CDATA[#acl EditorGroup:read,write,delete,revert All:read']]></source><p></p>
</s4>
<s4 id="Protecting them" title="Protecting them">
<p>If your default ACL allows writing for everyone, it is a good idea to protect critical group definition pages with some more restrictive ACL. </p>
<p>E.g. on a group definition page <code>AdminGroup</code>: </p>
<source><![CDATA[#acl AdminGroup:read,write,revert All:read
#format wiki
Members of this group will get admin rights. If you think you should be in this group, contact one of its members to add you.
 * SomeAdmin
 * AnotherAdmin]]></source><p>As you see: only members of this group may write to the group definition page (and of course everyone who gets write rights from acl_rights_before in the wiki config). </p>
<p></p>
</s4>
<s4 id="Using groups within groups" title="Using groups within groups">
<p>You can also add names of other groups as group members, that is the same as including all their members directly. </p>
<p></p>
</s4>
</s3>
<s3 id="Other ways to define groups / access group definitions" title="Other ways to define groups / access group definitions">
<p>MoinMoin can also use group definitions from other sources, but this needs to be configured in your wiki config. See <code>groups</code> on <jump href="/wiki/HelpOnConfiguration">HelpOnConfiguration</jump>. </p>
</s3></s2></s1>