Gitolite VREF/NAME - what not to push

家住魔仙堡 提交于 2019-12-08 06:18:44

问题


Is it possible to for me to stop members specific group be able to do commit containing ant file other than specified

Example

Stop @legal from pushing commits which contains file other than static/html/legal.html


RWC refs/heads/master = @legal
-   VREF/NAME/static/html/[^legal.html]$   =    @legal


回答1:


As I explained in "In gitolite, any easier way to create exceptions to users of @all?", the access rules follow a rule of accumulation.

In your case, you could grant read-access for all, and deny a directory for @legal, except for one file. Something like (not tested):

RW  refs/heads/master                 = @all
-   VREF/NAME/static/html             =    @legal
RW  VREF/NAME/static/html/legal.thml  =    @legal

The idea is for a more specific rule to override a more generic one.



来源:https://stackoverflow.com/questions/16265008/gitolite-vref-name-what-not-to-push

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!