Hello,
For my company i had to allow the wildcard * into ACL rules.
So, for pages /apps/myappone/private/home and /apps/mysecondapp/private/home i want to define only one general rule: apps:*:private:* and not one rule for /apps/mysecondapp/private/home and another for /apps/myappone/private/home
If we add the namespace/page /apps/thirdapp/private/foo , my general rules is applied to this new page, so i don't have to add a new rule :)
I think, many users must be interested in this modifications
*****************
Currently, dokuwiki check ACL for exacts matches (for the page) first, and after, for namespace check
With my modifications :
1) Dokuwiki original ACL exacts matches check
2) => Checking for pages ACL rules with wildcard *
3) For each namespace :
3.a) Dokuwiki namespace ACL check
3.b) => Checking for namespace ACL rules with wildcard *
*****************
I modified
- the ACL system :
/inc/auth.php : function auth_aclcheck() (see attachement)
- the plugin admin (for allowing adding new rules) :
/lib/plugin/acl/script.js :
added a new function :
function checkfreenewentry(){
var formobject = document.forms.newfreeentry;
//id cannot be null
if(formobject.idperso.value==''){
return false;
}
//if @group or @user is selected, it have to be filled
if((formobject.acl_t.value== "__g__" || formobject.acl_t.value== "__u__") && formobject.acl_w.value == ""){
return false;
}
}
/lib/plugin/acl/admin.php
modfication of functions handle() and html() (see attachement)
2 new lang vars in plugin lang file (/lib/plugin/acl/lang/en/lang.php) :
$lang['acl_custom'] = 'Custom ACL';
$lang['acl_addcustom'] = 'Add a custom ACL';
NB : my code modifications are between comments line :
//-------------------------
//Added by Johan GUILBAUD
//-------------------------
[...]
//-------------------------
PS : sorry for my english, i'm french...