Skip to content

Commit

Permalink
acl: fixed acl rule bug. add some allowed actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wkpark committed Nov 2, 2022
1 parent fcba4fe commit 9d00a8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/acl.default.php.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
@Guest Anonymous
* @ALL deny *
* @ALL allow edit,markup,ticket,savepage,titleindex,bookmark,pagelist,pagelist/ajax,identicon,oekaki
* @ALL allow notfound,edit,markup,recall,likepages,login,ticket,savepage,titleindex,bookmark,pagelist,pagelist/ajax,identicon,autogoto,retroidenticon,pagecount,scrap,recentchanges
* @ALL allow randompage,identicon,retroidenticon,pagesort
* @ALL allow autogoto,goto,notfound,likepages,titlesearch,backlinks
* @User allow *
Expand Down
3 changes: 1 addition & 2 deletions plugin/security/acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,15 @@ function __construct($DB="") {
list($pages, $rules, $group) = $this->parse_acl($acl_lines);
// save group definitions
$cache->update('acl_group', $group);

// save individual acl of all pages
foreach ($pages as $pagename=>$acl) {
$this->cache->update($pagename, $acl, 0, $params);
}
// save default ACL
$cache->update('acl_default', $rules['*']);
unset($rules['*']);
// make all in one regex for all patthern
$tmp = array_keys($rules);
unset($tmp[0]);
$rule = '('.implode(')|(', $tmp).')';

$vals = array_values($rules);
Expand Down

0 comments on commit 9d00a8b

Please sign in to comment.