Mercurial:阻止 Web 访问的 Acl 扩展示例
我可以看到如何使用 Acl 扩展来控制某些用户对特定存储库的推/拉,但是您可以使用 Acl 扩展来控制对存储库的“WEB”访问吗?我希望某些存储库仅对某些用户显示。
我正在 IIS7 上部署,因此该解决方案需要在该环境中运行。
I can see how you can use the Acl Extension to control the push/pull to a particular repository by certian users, but can you control "WEB" access to a repository using the Acl Extenstion? I would like certain repositories to only show up for certain users.
I am deploying on IIS7, so the solution will need to work in that environment.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我假设您是通过 HGWeb CGI 脚本执行此操作。如果是,您可以在每个项目的
.hg/hgrc
文件中指定allow_push
和allow_read
参数。如果您指定*
以外的allow_read
,不在列表中的用户甚至不会在 HGWeb 项目列表页面上看到该项目。I'm assuming you're doing this via the HGWeb CGI script. If you are, you can specify
allow_push
andallow_read
parameters in each project's.hg/hgrc
file. If you specify anallow_read
other than*
, users who are not in the list will not even see the project on the HGWeb project listing page.只需使用正常的 .htaccess 类似功能来限制可访问的存储库。
hg
大多数情况下不关心身份验证,并将其留给网络服务器。Just use normal
.htaccess
like fonctionnality to restrict which repo are accessible.hg
mostly doesn't care about auth and leaves that to the web server.