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

缘由
  我所安装的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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值