Trac--用户管理(安装用户注册及登录插件模块)

http://blog.163.com/kangle0925@126/blog/static/27758198201212164853146/

安装过程
  1.至http://trac-hacks.org/wiki/AccountManagerPlugin下载帐户管理插件http://trachacks.org/changeset/latest/accountmanagerplugin/0.11old_path=/&filename=accountmanagerplugin/0.11&format=zip
  2.解压后使用,进入setup.py 所在的目录下,用python setup.py bdist_egg命令将其打包成egg类型的文件;
  3.进入打包后的XXX.egg文件所在的目录下,执行命令:easy_install XXX.egg安装;
  4.以TRAC_ADMIN的身份登录trac,在管理->插件中,对所安装的tracaccountmanager 0.2.1dev组件进行启用(一般默认是已启用);
5.修改创建的trac项目下的trac.ini文件。根据密码的保存方式不同选择适合自己的配置方法。
一:HtPasswdStore

[components]
acct_mgr.admin.* = enabled
acct_mgr.api.* = enabled
acct_mgr.db.sessionstore = enabled
acct_mgr.htfile.htdigeststore = disabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.http.httpauthstore = disabled
acct_mgr.notification.* = enabled
acct_mgr.pwhash.htdigesthashmethod = disabled
acct_mgr.pwhash.htpasswdhashmethod = disabled
acct_mgr.svnserve.* = enabled
acct_mgr.svnserve.svnservepasswordstore = disabled
acct_mgr.web_ui.* = enabled
trac.web.auth.loginmodule = disabled
[account-manager]
password_store = HtPasswdStore
htpasswd_hash_type = md5
;password_file = /var/trac/trac.htpasswd   # old style (acct_mgr < 0.4)
htpasswd_file = /var/trac/trac.htpasswd   # new style (acct_mgr >= 0.4)

二:HtDigestStore

[components] acct_mgr.admin.* = enabled acct_mgr.api.* = enabled acct_mgr.db.sessionstore = enabled acct_mgr.htfile.htdigeststore = enabled acct_mgr.htfile.htpasswdstore = disabled acct_mgr.http.httpauthstore = disabled acct_mgr.notification.* = enabled acct_mgr.pwhash.htdigesthashmethod = disabled acct_mgr.pwhash.htpasswdhashmethod = disabled acct_mgr.svnserve.* = enabled acct_mgr.svnserve.svnservepasswordstore = disabled acct_mgr.web_ui.* = enabled trac.web.auth.loginmodule = disabled [account-manager] password_store = HtDigestStore htdigest_realm = Trac ;password_file = /var/trac/trac.htdigest # old style (acct_mgr < 0.4) htdigest_file = /var/trac/trac.htdigest # new style (acct_mgr >= 0.4) 
三:SessionStore 【我配的是这个】
[components]
acct_mgr.admin.* = enabled
acct_mgr.api.* = enabled
acct_mgr.db.sessionstore = enabled
acct_mgr.htfile.htdigeststore = disabled
acct_mgr.htfile.htpasswdstore = disabled
acct_mgr.http.httpauthstore = disabled
acct_mgr.notification.* = enabled
acct_mgr.pwhash.htdigesthashmethod = enabled
acct_mgr.pwhash.htpasswdhashmethod = disabled
acct_mgr.svnserve.* = enabled
acct_mgr.svnserve.svnservepasswordstore = disabled
acct_mgr.web_ui.* = enabled
acct_mgr.web_ui.registrationmodule = enabled
trac.web.auth.loginmodule = disabled
[account-manager]
account_changes_notify_addresses = 
hash_method = HtDigestHashMethod
notify_actions = new,change,delete
password_store = SessionStore
user_lock_max_time = 0
5.重启trac服务。

你可能感兴趣的:(Trac)