IAdmTrusteeMembershipCondition
The IAdmTrusteeMembershipCondition interface represents the If the initiator is a member of <group> condition.
Inheritance: IAdmCondition
Properties
-
Property
-
Description
-
IsOperator
-
Gets or sets a value indicating whether the operation initiator should or should not be a member of the specified group to meet the condition.
-
Group
-
Gets or sets the group that the operation initiator should or should not be a member of to meet the condition.
-
CheckDirectMembersOnly
-
Gets or sets a value indicating whether the condition is applied to direct members of the specified group only or to all the members, including members of the groups that are nested within the group.
Details
IsOperator
Gets or sets a value indicating whether the operation initiator should or should not be a member of the specified group to meet the condition.
- Type:
- ADM_ISOPERATOR_ENUM
- Access:
- Read/Write
Group
Gets or sets the group that the operation initiator should or should not be a member of to meet the condition.
- Type:
- IADsGroup
- Access:
- Read/Write
Remarks
When this property is set, the IAdmTrusteeMembershipCondition2::GroupDnTemplate property is automatically set to null.
Examples
The following code sample creates a condition that returns true if the operation initiator is a member of the Help Desk group.
- PowerShell
-
# The $actionSet variable refers to an action set in a # business rule, custom command, or scheduled task. # Create condition. $condition = $actionSet.Conditions.CreateEx("adm-TrusteeMembershipCondition") $membershipCondition = $condition.GetCondition() $membershipCondition.IsOperator = "ADM_ISOPERATOR_IS" $groupDN = "CN=Help Desk,OU=Groups,DC=domain,DC=com" $group = $service.OpenObject("Adaxes://$groupDN", $null, $null, 0) $membershipCondition.Group = $group # Save changes. $condition.SetCondition($membershipCondition) $condition.SetInfo() $actionSet.Conditions.Add($condition) - C#
-
// The actionSet variable refers to an action set in a // business rule, custom command, or scheduled task. // Create condition. IAdmBusinessRuleCondition condition = (IAdmBusinessRuleCondition)actionSet.Conditions.CreateEx( "adm-TrusteeMembershipCondition"); IAdmTrusteeMembershipCondition membershipCondition = (IAdmTrusteeMembershipCondition)condition.GetCondition(); membershipCondition.IsOperator = ADM_ISOPERATOR_ENUM.ADM_ISOPERATOR_IS; const string groupDN = "CN=Help Desk,OU=Groups,DC=domain,DC=com"; IADsGroup group = (IADsGroup)service.OpenObject($"Adaxes://{groupDN}", null, null, 0); membershipCondition.Group = group; // Save changes. condition.SetCondition(membershipCondition); condition.SetInfo(); actionSet.Conditions.Add(condition);
CheckDirectMembersOnly
Gets or sets a value indicating whether the condition is applied to direct members of the specified group only or to all the members, including members of the groups that are nested within the group.
- Type:
- bool
- Access:
- Read/Write
Requirements
Minimum required version: 2009.1