The scenario will include a Home page Action and a Business Rule triggering After Updating a User.
The Home Page Action will allow users to select the OU and the group for the new user. The Business Rule will add the user to the specified group and then move to the desired OU.
i. Creating the Home Page Action
- Launch Adaxes Web Interface Customization Tool.
- Select the interface type and click Configure Home Page Actions on the General tab.
- Click Add and select Modify User.
- On step 2 of the wizard, define the conditions for selecting the user to be modified and click Next.
- Select Use customized form and click Customize Form.
- Delete all the sections except for one (e.g. General).
- Delete all the properties from the section and click Add below Section fields.
Now, you need to add the properties that allow users to select an OU and a group. For users to be able to pick an OU and a group, you need to use DN syntax properties (e.g. Assistant and See Also). To add the properties to the form:
- Double-click the Assistant property.
- Select Show only the following object types.
- De-select Users and Contacts and click More object types.
- Select Organizational-Unit and click OK twice.
- Click Add below Section fields again and double-click the seeAlso property.
- Select Show only the following object types.
- Select only Groups and click OK.
- Finish creating the Home Page Action.
ii. Creating the Business Rule triggering After Updating a user
-
Launch Adaxes Administration Console.
-
Right-click your Adaxes service node, navigate to New and click Business Rule.
-
On step 2 of the Create Business Rule wizard, select User Object type.
-
Select After Updating a User and click Next.
-
Click Add Action.
-
Select Add the User to a group and click Select Group.
-
Activate the Template tab and paste the following into the Template field: %seeAlso%.
-
Click OK twice.
-
Right-click the action you have created and click Add New Action in the context menu.
-
Select Move the User and click Select Location.
-
Activate the Template tab and paste the following into the Template field: %assistant%.
-
Click OK twice.
-
Right-click the action again and click Add Condition in the context menu
-
Select If PowerShell script returns true.
-
Paste the script below into the Script field.
$groupDnAttribute = "seeAlso" # TODO: modify me
$ouDnAttribute = "assistant" # TODO: modify me
$Context.ConditionIsMet = $False
if ($Context.IsPropertyModified($ouDnAttribute) -or $Context.IsPropertyModified($groupDnAttribute))
{
$Context.ConditionIsMet = $True
}
-
Enter a short description and click OK.
-
Right-click the action you have created and click Add New Action again.
-
Select Enable/Disable the User account.
-
Select Enable the User account and click OK.
-
Finish creating the Business Rule.
You should have something like the following: