在CC.NET 1.5中配置安全设置

时间:2010-01-31 21:07:57

标签: cruisecontrol.net cruisecontrol

下面是我正在使用的ccnet.config文件,我正在使用CC.NET 1.5的新安全功能。任何人都可以让我知道我做错了什么。 我在DOMAIN中有两个组,我想让一个组只能查看,另一个组完全访问。

<cruisecontrol>
  <project>
   <name>Introvert</name> 
      <!-- Security Settings -->
      <security type="defaultProjectSecurity" defaultRight="Deny">
          <permissions>
              <!-- Grant permissions to this project -->
              <rolePermission name="ViewOnly" ref="ViewOnly"/>
              <rolePermission name="FullAccess" ref="FullAccess"/>
          </permissions>
      </security>

  </project>


<!-- Security Settings -->
    <internalSecurity>
        <users>
            <simpleUser name="DOMAIN\GROUP1\*" />
            <simpleUser name="DOMAIN\GROUP2\*" />
        </users>
        <permissions>
            !-- Roles -->
            <rolePermission name="FullAccess" forceBuild="Allow" startProject="Allow" >
                <users>
                    <userName name="DOMAIN\GROUP1\"/>
                </users>         
            </rolePermission>
            <rolePermission name="ViewOnly" forceBuild="Deny" startProject="Deny">
                <users>
                    <userName name="DOMAIN\GROUP2\"/>
                </users>
            </rolePermission>
        </permissions>
    </internalSecurity>
</cruisecontrol>

1 个答案:

答案 0 :(得分:0)

<!-- Security Settings --> 
    <internalSecurity> 
        <users> 
            <simpleUser name="DOMAIN\GROUP1\*" /> 
            <simpleUser name="DOMAIN\GROUP2\*" /> 
        </users> 
        <permissions> 
            **!-- Roles -->** <-- mising a "<", bad formatted XML
            <rolePermission name="FullAccess" forceBuild="Allow" startProject="Allow" > 
                <users> 
                    <userName name="DOMAIN\GROUP1\"/>  <-- shouldn't it be DOMAIN\GROUP1\*?
                </users>          
            </rolePermission> 
            <rolePermission name="ViewOnly" forceBuild="Deny" startProject="Deny"> 
                <users> 
                    <userName name="DOMAIN\GROUP2\"/> 
                </users> 
            </rolePermission> 
        </permissions> 
    </internalSecurity>