DokuWiki 採用 Mantis 認證權限

  • Dokuwiki : 2016-06-26a “Elenor of Tsort”
  • Mantis : 1.3.4
  • 設定 Mantis 相關資訊 /conf/local.protected.php
    <?php
    define( 'MANTIS_ROOT', '/var/www/html/mantis/' );
    define( 'MANTIS_URL', 'http://192.168.0.242/mantis/' );
    require_once( MANTIS_ROOT . 'core.php' );
    ?>
  • 將認證方式改成 authmantis , /conf/local.php
    <?php
    /*
     * Dokuwiki's Main Configuration File - Local Settings
     * Auto-generated by config plugin
     * Run for user:
     * Date: Mon, 12 Dec 2016 14:24:17 +0000
     */
    
    $conf['title'] = '知識管理庫';
    $conf['lang'] = 'zh-tw';
    :
    $conf['authtype'] = 'authmantis';
    $conf['superuser'] = '@ADMINISTRATOR';
    :
  • 設定 Mantis 對應權限 /conf/acl.auth.php
    :
    *               @ALL          0
    *               @user         8
    *       @VIEWER         1
    *       @REPORTER       2
    *       @UPDATER        4
    *       @DEVELOPER      8
    *       @MANAGER        16
    *       @ADMINISTRATOR  16
  • 這樣在 Mantis 登入後, 直接到 dokuwiki 網頁就會直接以 Mantis 登入身份狀態存取
  • 如果編輯 wiki 時工具列無法完整呈現時, 需在 .htaccess 增加以下設定
    :
    :
    ## Not all installations will require the following line.  If you do,
    ## change "/dokuwiki" to the path to your dokuwiki directory relative
    ## to your document root.
    RewriteBase /wiki
    
    # for Integration Mantis Toobar error issue
    Header set Content-Security-Policy "allow 'self'; media-src *; img-src *; script-src 'self' 'unsafe-inline' https://ajax.googleapis.com www.google-analytics.com; style-src 'self' 'unsafe-inline';"
    :
  • tech/dokuwiki_auth_mantis.txt
  • 上一次變更: 2016/12/14 23:33
  • jonathan