Integrate Dokuwiki ACL for file endpoint

This commit is contained in:
2026-01-09 11:13:12 +01:00
parent 23a50ce4f6
commit c11d9bdb8c
14 changed files with 91 additions and 138 deletions

View File

@@ -10,7 +10,6 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
{
/** @var string[] */
protected $configKeys = [
'access_allow',
'paths',
'scratchpad_paths',
'allow_in_comments',
@@ -49,10 +48,6 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
}
$newConf = [];
$accessAllow = $INPUT->str('access_allow');
$accessAllow = str_replace(["\r\n", "\r"], "\n", $accessAllow);
$newConf['access_allow'] = $accessAllow;
// Normalize newlines to "\n" for consistent parsing
$paths = $INPUT->str('paths');
$paths = str_replace(["\r\n", "\r"], "\n", $paths);
@@ -93,12 +88,6 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
echo '<fieldset>';
echo '<legend>' . hsc($this->getLang('legend')) . '</legend>';
// access_allow: multiline (users/groups)
$accessAllow = (string)$this->getConf('access_allow');
echo '<label class="block"><span>' . hsc($this->getLang('access_allow')) . '</span><br />';
echo '<textarea name="access_allow" rows="3" cols="80" class="edit">' . hsc($accessAllow) . '</textarea>';
echo '</label><br />';
// paths: multiline textarea
$paths = (string)$this->getConf('paths');
echo '<label class="block"><span>' . hsc($this->getLang('paths')) . '</span><br />';