Table of Contents
After installing, the automatic grouping can be configured exclusively in the Configuration page in the Admin Menu.
There are three settings:
- The first turns on the addition of users to groups when they amtch the grouping rules.
- The second turns on the removal of users when they do not match the rules.
- The last is a list if group matching rules, with one rule per line.
This plugin uses the wiki's assigned authentication module. It is shown to work on the default auththenication module, and should support any module where the users can be listed AND the groups modified.
<group name>,<account value>,<PCRE regular expression>
- The group name is the name of the group you would like to alter the membership of.
- The account value is either
loginfor the username,
namefor the wiki visible name, or
- The PCRE is a Perl Regular Expression that is supplied to the PHP preg_match function to test the account value associated with the user. Common formats are
/expression/for case sensitive matches and
/expression/ifor case insensitive matches. Please refer to PHP PCRE documentation for further information.
There can be more than one rule per group. In that case, a user is included in the group if any rule matches and removed if all rules fail.
Find any username containing
mike and add them to the
The above rule with a case insensitive search:
Add all users with a Gmail email address to the
Add the user to the
Dirty group if their username contains
dishes (case insensitive), their given name contains the word
Harry (case sensitive), or their email ends in
@dirty.com (case insensitive):
Dirty,login,/dishes/i Dirty,name,/\bHarry\b/ Dirty,mail,/@dirty.com$/i
The recommended method to test is to use an online PCRE testing tool and test your scenarios out there. One such site is Regular Expressions 101.
This plugin also supports the Dokuwiki debug framework. If you enable the allow debug setting in the wiki's configuration, then this module will display the groups a user is assigned to or removed from. Please note that the debug option is not meant to be left on, so disable it when you are done testing.
- * Added the username to the account info block being matched against. (2018-08-06 08:09)
- Create README.md (2018-08-06 04:42)
- Merge branch 'master' of https://github.com/wilminator/dokuwiki-plugi… (2018-08-06 04:38)
- * Initial commit (2018-08-06 04:37)
- Initial commit (2018-08-06 04:36)
Known Bugs and Issues
- This plugin does not allow for rules to remove users on match, only to add on match and remove with no match. For now, rewite the rules to not match the users that should be removed.
There are no plans at this time for any new features. If you have a feature request, then please file it as an issue at GitHub by clicking on the “Submit Bug” button at the top of this page.