CruiseControl保护构建项目节点

时间:2011-07-26 11:59:58

标签: cruisecontrol.net cctray

有没有办法在cruisecontrol中保护构建项目节点?我想限制强制构建对特定用户的使用。

1 个答案:

答案 0 :(得分:4)

这可以通过在项目配置中添加<security>标记来完成。

<project name="TestProject">
  <security type="defaultProjectSecurity" defaultRight="Deny">
    <permissions>      
      <rolePermission name="TestProjectAdmin" ref="FractionFactionAdmin" />
    </permissions>
  </security>
</project>

<internalSecurity>
  <cache type="inMemoryCache" duration="30" mode="sliding"/>
  <users>
     <passwordUser name="user1" password="change"/>
     <passwordUser name="user2" password="change"/>
  </users>
  <permissions>
    <rolePermission name="TestProjectAdmin" defaultRight="Allow" forceBuild="Allow" viewProject="Allow" startProject="Allow">
       <users>
         <userName name="user1"/>
         <userName name="user2"/>
       </users>
    </rolePermission>  
 </permissions>
</internalSecurity>

试试这个