ClaimsPrincipalPermission.Intersect(IPermission) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a permission that is the intersection of the current permission and the specified permission.
public:
virtual System::Security::IPermission ^ Intersect(System::Security::IPermission ^ target);
public System.Security.IPermission Intersect (System.Security.IPermission target);
abstract member Intersect : System.Security.IPermission -> System.Security.IPermission
override this.Intersect : System.Security.IPermission -> System.Security.IPermission
Public Function Intersect (target As IPermission) As IPermission
Parameters
- target
- IPermission
The permission to intersect with the current permission. It must be an instance of ClaimsPrincipalPermission.
Returns
A new ClaimsPrincipalPermission that represents the intersection of the current permission and the specified permission; or null
if target
is null
or is not an instance of ClaimsPrincipalPermission.
Implements
Remarks
The permission that is returned has only the resource-action pairs that were present both in the current permission and in the specified permission. Resource-action pairs that existed in only one or the other of the permissions are not included. For a Demand to succeed on the new permission, the current principal only needs to be authorized for the resource-action pairs that were common to the current permission and the specified permission.