其他分享
首页 > 其他分享> > Trac安装用户注册及登录插件模块

Trac安装用户注册及登录插件模块

作者:互联网

原文链接:http://www.cnblogs.com/jeanvixue/archive/2011/07/08/2100750.html 缘由   我所安装的Trac是与VisualSVNServer进行整合的。Trac默认安装时所采用的认证为HTTP的认证方式。其不方便的地方为:
  1. 某一用户登录后,在COOKIE有效的时间内,无法变更用户登录;
  2. 用户无修改密码的地方,只能通过管理员进行修改; 安装过程   1.至http://trac-hacks.org/wiki/AccountManagerPlugin下载帐户管理插件http://trac-hacks.org/changeset/latest/accountmanagerplugin/0.11?old_path=/&filename=accountmanagerplugin/0.11&format=zip
  2. 解压后使用python setup.py bdist_egg命令将其打包成egg;
  3. easy_install XXX.egg;
  4. 以TRAC_ADMIN的身份登录trac,在管理->插件中,对所安装的tracaccountmanager 0.2.1dev组件进行启用;
  5. 回到apache的配置文件httpd-custom.conf, 将/login部分的验证部分Require valid-user 注释掉;
<Location '/trac_home/1st/login'>
AuthType Basic
AuthName "Trac_home 1st project"
AuthUserFile D:/Repositories/htpasswd
#Require valid-user
</Location>
  6. 在trac.ini中components的SECTION,增加trac.web.auth.loginmodule = disabled行,要求trac禁用http验证的方式;
[components]
trac.web.auth.loginmodule = disabled
acct_mgr.admin.accountmanageradminpage = enabled
acct_mgr.api.accountmanager = enabled
acct_mgr.db.sessionstore = enabled
acct_mgr.htfile.abstractpasswordfilestore = enabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.http.httpauthstore = enabled
acct_mgr.notification.accountchangelistener = enabled
acct_mgr.notification.accountchangenotificationadminpanel = enabled
acct_mgr.pwhash.htpasswdhashmethod = enabled
acct_mgr.web_ui.accountmodule = enabled
acct_mgr.web_ui.loginmodule = enabled
  7. 在trac.ini中新增[account-manager] section;
    1) password_store 指明了密码的存取方式
    2) password_file指明了密码文件的位置     3) password_format 指明了格式, 因VisualSVNServer所集成的apache用的是htpasswd文件格式,故值写入相应的
[account-manager]
password_store = HtPasswdStore
password_file = D:\Repositories\htpasswd
password_format = htpasswd
  8.重启VisualSVNServer完成

转载于:https://www.cnblogs.com/jeanvixue/archive/2011/07/08/2100750.html

标签:enabledacct,插件,http,Trac,trac,用户注册,mgr,web,password
来源: https://blog.csdn.net/weixin_30624825/article/details/98718593