zoukankan      html  css  js  c++  java
  • TFS权限管理技术文档

    此阶段主要完成的功能主要是位于项目级别,根据需求分析得到主要的功能如下:

    函数名称

    作用

    AddGroup

    向现有组中添加组

    AddUser

    向现有组中添加用户

    DeleteGroup

    从现有组中删除组

    DeleteUser

    从现有组中删除用户

    AddPowerForGroup

    为指定的组授予指定的权限

    MovePowerGroup

    从指定的组中删除指定的权限

    GetMemberOfGroup

    得到指定组中的成员

    GetAuthorityGroup

    获得项目下的所有项目的权限组

    CreateGroup

    创建项目级别的组

    ClearGroup

    删除项目级别的组

    GetGroupDescription

    获得项目组的描述

    (注:以上函数名称是为了讲解方便而命名的,并不是Tfssecurity中本来就有的)

    在拼接以下命令时要注意有可能组名、域用户名、项目名等出现中文,这种情况要加上双引号。例如我们要将spm域中的用户John(约翰)添加到Test项目集下aaa这个项目下的Bulider(构建者)这个组中,其命令如下:

         Tfssecurity /g+ “[aaa]\Bulider(构建者)” “n:spm\John(约翰)” ALLOW /collection:http://spmserver:8080/tfs/Test

    以上功能主要靠TFSSecurity.exe这个工具来实现,这个工具在C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE目录下,调用命令返回的都是string型的字符流。

    现将以上功能实现的命令列出:

    1、  AddGroup、DeleteGroup(向现有组中添加或删除组)

    【命令】tfssecurity /g+ [ProjectName]\groupIdentity n:[ProjectName]\memberIdentity ALLOW /collection:CollectionURI

           tfssecurity /g- [ProjectName]\groupIdentity n:[ProjectName]\memberIdentity ALLOW /collection:CollectionURI

    【参数说明】

          

    参数名

    说明

    ProjectName

    groupIdentity、memberIdentity组所在的团队项目名称

    groupIdentity

    即将有别的组加入的组

    memberIdentity

    即将加入别的组的组

    CollectionURI

    groupIdentity组所在的团队项目集合的URI

     

    【说明】

         

         

    2、  AddUser、DeleteUser(向现有的组中添加或删除用户)

    【命令】

    tfssecurity /g+ [ProjectName]\groupIdentity n:DomainName\memberIdentity ALLOW /collection:CollectionURI

    tfssecurity /g- [ProjectName]\groupIdentity n:DomainName\memberIdentity ALLOW /collection:CollectionURI

     

    【参数说明】

    参数名

    说明

    ProjectName

    groupIdentity组所在的团队项目名称

    groupIdentity

    即将有别的成员加入的组

    DomainName

    成员所在的域的名称

    memberIdentity

    即将加入别的组的成员

    CollectionURI

    groupIdentity组所在的团队项目集合的URI

     

    3、  AddPowerForGroup、MovePowerForGroup(为指定的组添加或删除指定的权限)

    【命令】Tfssecurity /a+ Project FrameworkGlobalSecurity PermissionsName n:[ProjectName]\GroupName ALLOW /collection:CollectionURI

    Tfssecurity /a- Project FrameworkGlobalSecurity PermissionsName n:[ProjectName]\GroupName ALLOW /collection:CollectionURI

             【参数说明】

    参数名

    说明

    PermissionsName

    指定权限的名称

    ProjectName

    指定的组所在的团队项目的名称

    GroupName

    指定的组的名称

    CollectionURI

    指定的组所在的团队项目集合的URI

    4、  CreateGroup(创建项目级别的组)

    【命令】

    Tfssecurity /gcg GroupName GroupDescription /Collection:CollectionURI

    【参数说明】

    参数名

    说明

    GroupName

    所要创建的组的名称

    GroupDescription

    所要创建的组的说明

    CollectionURI

    所要创建的组所在的团队项目集合的URI

    【说明】

    如果组名和组描述有多个单词或者中文组成,需要加上双引号。

     

    5、  ClearGroup(删除项目级别的组)

    【命令】

    Tfssecurity /gd [ProjectName]\GroupName /collection:CollectionURI

             【参数说明】

             

    参数名

    说明

    ProjectName

    要删除的组所在的项目

    GroupName

    要删除的组名

    CollectionURI

    要删除的组所在的团队项目集合的地址

    6、  GetAuthorityGroup(获得项目集下所有项目的权限组)

    【命令】

           Tfssecurity /im all: /collection:collectionURI

    【参数说明】

     

    参数名

    说明

    CollectionURI

    要查询的组所在的团队项目集合的URI

    【说明】

          调用此命令返回的是一个字符流,为此我们需要将权限组信息从字符流中截取出来

     

    7、  GetMemberOfGroup(获取相应组的所有成员)

    【命令】

       Tfssecurity /im groupName /collection:collectionUrl

    【参数说明】

    参数名

    说明

    groupName

    组的名称

    CollectionURI

    组所在的团队项目集合的地址

    【说明】

           调用此命令返回的是一个字符流,为此我们需要将组中所有成员的信息从字符流中截取出来

     

    8、  GetGroupDescription(获得项目组的描述)

    【命令】  Tfssecurity /i GroupName /collection:collectionUrl

    【参数说明】

    参数名

    说明

    GroupName

    组的名称

    CollectionURI

    组所在的团队项目集合的地址

    【说明】

          调用此命令返回的是一个字符流,其中包含了关于组名的描述,需要运用字符串处理方法将信息截取出来

     

  • 相关阅读:
    【LeetCode OJ】Remove Element
    【LeetCode OJ】Remove Duplicates from Sorted Array
    【LeetCode OJ】Swap Nodes in Pairs
    【LeetCode OJ】Merge Two Sorted Lists
    【LeetCode OJ】Remove Nth Node From End of List
    【LeetCode OJ】Two Sum
    【LeetCode OJ】Majority Element
    最长公共子序列问题
    php fopen与file_get_contents的区别
    PHP 技巧集合
  • 原文地址:https://www.cnblogs.com/hesitate/p/2451027.html
Copyright © 2011-2022 走看看