TeamFoundationSecurityNamespace.CheckPermissionForAnyChildren Method (TeamFoundationRequestContext, IEnumerable<String>, Int32, Boolean, Boolean, PermissionEvaluationCallback)
First checks to see whether the request context making the call is a SystemRequestContext and if it is, it returns immediately. Next, it queries the underlying permission store to determine whether the requestContext.UserContext has the requested permissions for this token or any one of its children. If alwaysAllowAdministrators is true and the UserContext is an admin on this host, the user will have permissions regardless of what the permission evaluation says. If the UserContext does not have the requestedPermissions for any of the children, a SecurityAccessException will be thrown.
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Sub CheckPermissionForAnyChildren ( _
requestContext As TeamFoundationRequestContext, _
tokens As IEnumerable(Of String), _
requestedPermissions As Integer, _
resultIfNoChildrenFound As Boolean, _
alwaysAllowAdministrators As Boolean, _
permissionEvaluationCallback As PermissionEvaluationCallback _
)
public void CheckPermissionForAnyChildren(
TeamFoundationRequestContext requestContext,
IEnumerable<string> tokens,
int requestedPermissions,
bool resultIfNoChildrenFound,
bool alwaysAllowAdministrators,
PermissionEvaluationCallback permissionEvaluationCallback
)
public:
void CheckPermissionForAnyChildren(
TeamFoundationRequestContext^ requestContext,
IEnumerable<String^>^ tokens,
int requestedPermissions,
bool resultIfNoChildrenFound,
bool alwaysAllowAdministrators,
PermissionEvaluationCallback^ permissionEvaluationCallback
)
member CheckPermissionForAnyChildren :
requestContext:TeamFoundationRequestContext *
tokens:IEnumerable<string> *
requestedPermissions:int *
resultIfNoChildrenFound:bool *
alwaysAllowAdministrators:bool *
permissionEvaluationCallback:PermissionEvaluationCallback -> unit
public function CheckPermissionForAnyChildren(
requestContext : TeamFoundationRequestContext,
tokens : IEnumerable<String>,
requestedPermissions : int,
resultIfNoChildrenFound : boolean,
alwaysAllowAdministrators : boolean,
permissionEvaluationCallback : PermissionEvaluationCallback
)
Parameters
requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContextThe request context associated with this call.
tokens
Type: System.Collections.Generic.IEnumerable<String>The parent tokens the permissions are being checked on.
requestedPermissions
Type: System.Int32The permissions to check for.
resultIfNoChildrenFound
Type: System.BooleanIn the case where no children are found this is the value that will be returned. Since hierarchical namespaces are sparse, children for the token might exist but do not have permissions set on them and therefore the security service will not see them.
alwaysAllowAdministrators
Type: System.BooleanIf true and the UserContext is an admin on this host, the user will have permission regardless of what the permission evaluation says.
permissionEvaluationCallback
Type: Microsoft.TeamFoundation.Framework.Server.PermissionEvaluationCallbackThe permission evaluation callback that will be fired every time that a permission decision is being made. Nothing will be fired if this value is null.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
TeamFoundationSecurityNamespace Class