DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:aclplusregex

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:aclplusregex [2021-01-19 23:50] – version upped andiplugin:aclplusregex [2024-01-07 14:43] (current) Aleksandr
Line 6: Line 6:
 email      : dokuwiki@cosmocode.de email      : dokuwiki@cosmocode.de
 type       : action type       : action
-lastupdate : 2021-01-19 +lastupdate : 2023-11-13 
-compatible : greebo+compatible : Greebo
 depends    :  depends    : 
 conflicts  conflicts 
Line 21: Line 21:
 ---- ----
  
-[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]] +[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ https://www.cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]
  
 This plugin allows you to set up additional [[:acl|Access Control Lists (ACL)s]] based on user's names or groups. This is especially useful where users come from external sources (like Active Directory) and follow a certain naming scheme. This plugin allows you to set up additional [[:acl|Access Control Lists (ACL)s]] based on user's names or groups. This is especially useful where users come from external sources (like Active Directory) and follow a certain naming scheme.
Line 48: Line 47:
 The plugin can either run ''AFTER'' or ''BEFORE'' DokuWiki's default ACL handling. The plugin can either run ''AFTER'' or ''BEFORE'' DokuWiki's default ACL handling.
  
-In ''AFTER'' mode, the plugin will check the ACLs defined by this plugin and will only apply a result if it is higher than the one that DokuWiki found in it'own ACL setup. This is probably what most users want+In ''AFTER'' mode, the plugin will check the ACLs defined by this plugin and will only apply a result if it is higher than the one that DokuWiki found in its own ACL setup. This is probably what most users want.
- +
-In the ''BEFORE'' mode all plugin defined rules are checked before DokuWiki does it's own checks and if there are any rules that apply to the current user, these rules are applied and no further checking by DokuWiki is done. This may be the mode you want if you have a large amount of dynamic rules as this may be faster.+
  
 +In the ''BEFORE'' mode all plugin defined rules are checked before DokuWiki does its own checks and if there are any rules that apply to the current user, these rules are applied and no further checking by DokuWiki is done. This may be the mode you want if you have a large amount of dynamic rules as this may be faster.
  
 ==== Examples ==== ==== Examples ====
Line 83: Line 81:
 </code> </code>
  
 +You can also use regular expressions in the id part of the configuration line like this:
 +<code>
 +docs:customer:$1:(\d{3})   @customer_(\d{5})_sub   4
 +</code>
 +
 +Note that you **have to** define your pattern as a group and put it in parentheses, otherwise it won't be recognized as regex.
 +
 +The above would allow user in a group like ''@customer_54321_sub'' to create pages in namespaces such as
 +  * ''docs:customer:54321:001''
 +  * ''docs:customer:54321:002''
 +  * ''docs:customer:54321:003''
  
 ===== Changleog ===== ===== Changleog =====
Line 91: Line 100:
  
 {{rss>https://github.com/cosmocode/dokuwiki-plugin-aclplusregex/releases.atom description author}} {{rss>https://github.com/cosmocode/dokuwiki-plugin-aclplusregex/releases.atom description author}}
- 
  
  
plugin/aclplusregex.1611096607.txt.gz · Last modified: 2021-01-19 23:50 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki