IAdmTrusteeBusinessUnitCondition
The IAdmTrusteeBusinessUnitCondition interface represents the If the initiator belongs to <business unit> 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 business unit to meet the condition.
-
BusinessUnit
-
Gets or sets the business unit that the operation initiator should or should not be a member of to meet the condition.
Details
IsOperator
Gets or sets a value indicating whether the operation initiator should or should not be a member of the business unit to meet the condition.
- Type:
- ADM_ISOPERATOR_ENUM
- Access:
- Read/Write
BusinessUnit
Gets or sets the business unit that the operation initiator should or should not be a member of to meet the condition.
- Type:
- IAdmBusinessUnit
- Access:
- Read/Write
Examples
The following code sample creates a condition that returns true if the initiator is a member of the Managers business unit.
- 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-TrusteeBusinessUnitCondition") $businessUnitCondition = $condition.GetCondition() $businessUnitCondition.IsOperator = "ADM_ISOPERATOR_IS" # Bind to the business unit. $containerPath = $service.Backend.GetConfigurationContainerPath("BusinessUnits") $pathObj = New-Object "Softerra.Adaxes.Adsi.AdsPath" $containerPath $unitPath = $pathObj.CreateChildPath("CN=Managers") $unit = $service.OpenObject($unitPath.ToString(), $null, $null, 0) $businessUnitCondition.BusinessUnit = $unit # Save changes. $condition.SetCondition($businessUnitCondition) $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-TrusteeBusinessUnitCondition"); IAdmTrusteeBusinessUnitCondition businessUnitCondition = (IAdmTrusteeBusinessUnitCondition)condition.GetCondition(); businessUnitCondition.IsOperator = ADM_ISOPERATOR_ENUM.ADM_ISOPERATOR_IS; // Bind to the business unit. string containerPath = service.Backend.GetConfigurationContainerPath("BusinessUnits"); AdsPath pathObj = new AdsPath(containerPath); AdsPath unitPath = pathObj.CreateChildPath("CN=Managers"); IAdmBusinessUnit unit = (IAdmBusinessUnit)service.OpenObject(unitPath.ToString(), null, null, 0); businessUnitCondition.BusinessUnit = unit; // Save changes. condition.SetCondition(businessUnitCondition); condition.SetInfo(); actionSet.Conditions.Add(condition);
Requirements
Minimum required version: 2009.1