ISecurityNamespaceExtension.ThrowAccessDeniedException Method
Implementing this function allows the implementer to throw there own type of exception when AccessDenied exceptions need to be thrown. If this method does not throw an exception the standard AccessCheckException will be thrown.
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Sub ThrowAccessDeniedException ( _
requestContext As TeamFoundationRequestContext, _
identity As Identity, _
token As String, _
requestedPermissions As Integer _
)
void ThrowAccessDeniedException(
TeamFoundationRequestContext requestContext,
Identity identity,
string token,
int requestedPermissions
)
void ThrowAccessDeniedException(
TeamFoundationRequestContext^ requestContext,
Identity^ identity,
String^ token,
int requestedPermissions
)
abstract ThrowAccessDeniedException :
requestContext:TeamFoundationRequestContext *
identity:Identity *
token:string *
requestedPermissions:int -> unit
function ThrowAccessDeniedException(
requestContext : TeamFoundationRequestContext,
identity : Identity,
token : String,
requestedPermissions : int
)
Parameters
requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContextThe request context for the current request which contains the user trying to perform the action.
identity
Type: Microsoft.VisualStudio.Services.Identity.IdentityThe identity of the user who made the call that is resulting in this exception.
token
Type: System.StringThe token the check was performed on.
requestedPermissions
Type: System.Int32The permissions needed to perform the action the caller was trying to perform
.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.