en-US/about_AzDoQueryPermission.help.txt

.NAME
    AzDoQueryPermission
 
.SYNOPSIS
    DSC resource for managing permissions on Azure DevOps work item query folders.
 
.DESCRIPTION
    Manages the ACL for a folder in a project's shared query tree, using the
    'WorkItemQueryFolders' security namespace.
 
    Permissions are administered on folders and inherited by the queries beneath them, which is
    how query security is normally organised in practice. Omitting QueryPath targets the
    project's query root, so a single declaration can set the baseline for every query in the
    project.
 
.PARAMETER ProjectName
    Key - System.String
    The name of the Azure DevOps project.
 
.PARAMETER QueryPath
    Write - System.String
    The full path of the query folder, including the root - for example
    'Shared Queries/Platform'. Omit to target the project's query root, which is the parent of
    every query in the project.
 
.PARAMETER isInherited
    Write - System.Boolean
    Whether the ACL inherits permissions from its parent. Defaults to $true.
 
.PARAMETER Permissions
    Write - HashTable[]
    The access control entries, as an array of hashtables:
    @{ Identity = '[ProjectName]\GroupName'; Permission = @{ Read = 'Allow'; Contribute = 'Deny' } }
 
.EXAMPLE 1
 
This example shows how to set permissions on a work item query folder.
 
Permissions are administered on folders and inherited by the queries beneath them.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoQueryPermission 'AddAzDoQueryPermission'
        {
            ProjectName = 'MyProject'
            QueryPath = 'Shared Queries/Platform'
            isInherited = $true
            Permissions = @(
                @{
                    Identity = '[MyProject]\Platform Team'
                    Permission = @{
                        Read = 'Allow'
                        Contribute = 'Allow'
                    }
                }
            )
        }
    }
}
 
.EXAMPLE 2
 
This example shows how to set the baseline permissions for every query in a project by
omitting QueryPath, which targets the project's query root.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoQueryPermission 'AddProjectQueryRootPermission'
        {
            ProjectName = 'MyProject'
            isInherited = $true
            Permissions = @(
                @{
                    Identity = '[MyProject]\Contributors'
                    Permission = @{ Read = 'Allow' }
                }
            )
        }
    }
}