国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

DokuWiki整合Zentao的用戶授權及分組體系

2019-11-15 02:05:59
字體:
來源:轉載
供稿:網友
DokuWiki整合Zentao的用戶授權及分組體系

老外們把精力都放在了怎樣做通用性上面了。

Doku后臺有切換授權方式的選項,改成MySQL

注:如下修改mysql.conf.php后,要把分組和權限設置結合起來,還需要配置dokuwiki的分組,zentao默認有一些角色分組:

acl.auth.php

# acl.auth.php# <?php exit()?># Don't modify the lines above## access Control Lists## Auto-generated by install script# Date: Mon, 05 Jan 2015 13:09:23 +0000*@ALL1*@admin8*@user8*@dev8*@qa8*@pm8*@po8*@td8*@pd8*@top8*@guest1

conf/mysql.conf.php

<?php/* * This is an example configuration for the mysql auth plugin. * * This SQL statements are optimized for following table structure. * If you use a different one you have to change them accordingly. * See comments of every statement for details. * * TABLE users *     uid   login   pass   firstname   lastname   email * * TABLE groups *     gid   name * * TABLE usergroup *     uid   gid * * To use this configuration you have to copy them to local.PRotected.php * or at least include this file in local.protected.php. *//* Options to configure database access. You need to set up this * options carefully, otherwise you won't be able to access you * database. */$conf['plugin']['authmysql']['server']   = 'localhost';$conf['plugin']['authmysql']['user']     = 'zentaoxx';$conf['plugin']['authmysql']['passWord'] = 'xxxxx';$conf['plugin']['authmysql']['database'] = 'zentaoxx';/* This option enables debug messages in the mysql plugin. It is * mostly useful for system admins. */$conf['plugin']['authmysql']['debug'] = 0;/* Normally password encryption is done by DokuWiki (recommended) but for * some reasons it might be usefull to let the database do the encryption. * Set 'forwardClearPass' to '1' and the cleartext password is forwarded to * the database, otherwise the encrypted one. */$conf['plugin']['authmysql']['forwardClearPass'] = 1;/* Multiple table Operations will be protected by locks. This array tolds * the plugin which tables to lock. If you use any aliases for table names * these array must also contain these aliases. Any unamed alias will cause * a warning during operation. See the example below. */$conf['plugin']['authmysql']['TablesToLock']= array();//"users", "users AS u","groups", "groups AS g", "usergroup", "usergroup AS ug"/***********************************************************************//*       Basic SQL statements for user authentication (required)       *//***********************************************************************//* This statement is used to grant or deny access to the wiki. The result * should be a table with exact one line containing at least the password * of the user. If the result table is empty or contains more than one * row, access will be denied. * * The plugin accesses the password as 'pass' so a alias might be necessary. * * Following patters will be replaced: *   %{user}    user name *   %{pass}    encrypted or clear text password (depends on 'encryptPass') *   %{dgroup}  default group name */$conf['plugin']['authmysql']['checkPass']   = "SELECT password                                               FROM zt_usergroup AS ug                                               JOIN zt_user AS u ON u.account=ug.account                                               JOIN zt_group AS g ON g.id=ug.group                                               WHERE account='%{user}'                                               AND name='%{dgroup}'";/* This statement should return a table with exact one row containing * information about one user. The field needed are: * 'pass'  containing the encrypted or clear text password * 'name'  the user's full name * 'mail'  the user's email address * * Keep in mind that Dokuwiki will access thise information through the * names listed above so aliasses might be neseccary. * * Following patters will be replaced: *   %{user}    user name */$conf['plugin']['authmysql']['getUserInfo'] = "SELECT password, realname AS name, email AS mail                                               FROM zt_user                                               WHERE account='%{user}'";/* This statement is used to get all groups a user is member of. The * result should be a table containing all groups the given user is * member of. The plugin accesses the group name as 'group' so an alias * might be nessecary. * * Following patters will be replaced: *   %{user}    user name */$conf['plugin']['authmysql']['getGroups']   = "SELECT name as `group`                                               FROM zt_group g, zt_user u, zt_usergroup ug                                               WHERE u.account = ug.account                                               AND g.id = ug.group                                               AND u.account='%{user}'";/***********************************************************************//*      Additional minimum SQL statements to use the user manager      *//***********************************************************************//* This statement should return a table containing all user login names * that meet certain filter criteria. The filter expressions will be added * case dependend by the plugin. At the end a sort expression will be added. * Important is that this list contains no double entries fo a user. Each * user name is only allowed once in the table. * * The login name will be accessed as 'user' to a alias might be neseccary. * No patterns will be replaced in this statement but following patters * will be replaced in the filter expressions: *   %{user}    in FilterLogin  user's login name *   %{name}    in FilterName   user's full name *   %{email}   in FilterEmail  user's email address *   %{group}   in FilterGroup  group name */$conf['plugin']['authmysql']['getUsers']    = "SELECT DISTINCT account AS user                                               FROM zt_user AS u                                               LEFT JOIN zt_usergroup AS ug ON u.account=ug.account                                               LEFT JOIN zt_group AS g ON ug.group=g.id";$conf['plugin']['authmysql']['FilterLogin'] = "account LIKE '%{user}'";$conf['plugin']['authmysql']['FilterName']  = "realname LIKE '%{name}'";$conf['plugin']['authmysql']['FilterEmail'] = "email LIKE '%{email}'";$conf['plugin']['authmysql']['FilterGroup'] = "name LIKE '%{group}'";$conf['plugin']['authmysql']['SortOrder']   = "ORDER BY login";/***********************************************************************//*   Additional SQL statements to add new users with the user manager  *//***********************************************************************//* This statement should add a user to the database. Minimum information * to store are: login name, password, email address and full name. * * Following patterns will be replaced: *   %{user}    user's login name *   %{pass}    password (encrypted or clear text, depends on 'encryptPass') *   %{email}   email address *   %{name}    user's full name */$conf['plugin']['authmysql']['addUser']     = "";/* This statement should add a group to the database. * Following patterns will be replaced: *   %{group}   group name */$conf['plugin']['authmysql']['addGroup']    = "";/* This statement should connect a user to a group (a user become member * of that group). * Following patterns will be replaced: *   %{user}    user's login name *   %{uid}     id of a user dataset *   %{group}   group
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 晋江市| 江孜县| 克山县| 云霄县| 麻城市| 无锡市| 甘南县| 枣阳市| 游戏| 嫩江县| 红河县| 陈巴尔虎旗| 瑞丽市| 化隆| 滁州市| 丹江口市| 贵定县| 宜川县| 潮安县| 定襄县| 乌兰县| 鸡西市| 博白县| 临猗县| 邵东县| 广河县| 桐庐县| 青海省| 祁门县| 奉新县| 寿光市| 孟村| 屏东县| 武邑县| 宝清县| 泗洪县| 建阳市| 西充县| 监利县| 平安县| 岳普湖县|