IAdmMemberSpecificObjectCondition
The IAdmMemberSpecificObjectCondition interface represents the If the member is <specific object> condition, which is available in business rules before/after adding/removing a member from a group.
Inheritance: IAdmSpecificObjectCondition
Properties
-
Property
-
Description
-
IsOperator
-
Gets or sets a value indicating whether the member should or should not be the specified object for the condition to be met.
-
ObjectToCompareWith
-
Gets or sets the object for comparison.
Details
IsOperator
Gets or sets a value indicating whether the member should or should not be the specified object for the condition to be met.
- Type:
- ADM_ISOPERATOR_ENUM
- Access:
- Read/Write
ObjectToCompareWith
Gets or sets the object for comparison.
- Type:
- IAdmObjectReference
- Access:
- Read/Write
Examples
The following code sample creates a condition that returns true if the new group member is John Smith.
- PowerShell
-
# The $actionSet variable refers to an action set in a # before/after adding/removing a member from a group business rule. # Create condition. $condition = $actionSet.Conditions.CreateEx("adm-MemberSpecificObjectCondition") $specificObjectCondition = $condition.GetCondition() $specificObjectCondition.IsOperator = "ADM_ISOPERATOR_IS" $objReference = New-Object "Softerra.Adaxes.Adsi.AdmObjectReference" $objReference.ObjectDN = "CN=John Smith,CN=Users,DC=domain,DC=com" $specificObjectCondition.ObjectToCompareWith = objReference # Save changes. $condition.SetCondition($specificObjectCondition) $condition.SetInfo() $actionSet.Conditions.Add($condition) - C#
-
// The actionSet variable refers to an action set in a // before/after adding/removing a member from a group business rule. // Create condition. IAdmBusinessRuleCondition condition = (IAdmBusinessRuleCondition)actionSet.Conditions.CreateEx( "adm-MemberSpecificObjectCondition"); IAdmMemberSpecificObjectCondition specificObjectCondition = (IAdmMemberSpecificObjectCondition)condition.GetCondition(); specificObjectCondition.IsOperator = ADM_ISOPERATOR_ENUM.ADM_ISOPERATOR_IS; IAdmObjectReference objReference = new AdmObjectReference(); objReference.ObjectDN = "CN=John Smith,CN=Users,DC=domain,DC=com"; specificObjectCondition.ObjectToCompareWith = objReference; // Save changes. condition.SetCondition(specificObjectCondition); condition.SetInfo(); actionSet.Conditions.Add(condition);
Requirements
Minimum required version: 2023