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

来源:互联网 发布:郑州管家婆软件总代理 编辑:程序博客网 时间:2024/06/07 09:31

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.* = enabledacct_mgr.api.* = enabledacct_mgr.db.sessionstore = enabledacct_mgr.htfile.htdigeststore = disabledacct_mgr.htfile.htpasswdstore = disabledacct_mgr.http.httpauthstore = disabledacct_mgr.notification.* = enabledacct_mgr.pwhash.htdigesthashmethod = enabledacct_mgr.pwhash.htpasswdhashmethod = disabledacct_mgr.svnserve.* = enabledacct_mgr.svnserve.svnservepasswordstore = disabledacct_mgr.web_ui.* = enabledacct_mgr.web_ui.registrationmodule = enabledtrac.web.auth.loginmodule = disabled
[account-manager]account_changes_notify_addresses = hash_method = HtDigestHashMethodnotify_actions = new,change,deletepassword_store = SessionStoreuser_lock_max_time = 0
5.重启trac服务。