The following example demonstrates how to disable a Power User's Sub-Users and Policies.
A PHP file called Disable_Power_User_Sub_Users_And_Policies.php can be found in <installdir>/apisamples. Read more in Accessing Example API Functions.
The PHP script searches and disables objects in the system and prints result messages like the following on the screen:
- "Successfully retrieved all the users" / "No user found with the specified ID" / "Failed to get the specified user"
- "Successfully retrieved all the agents" / "No Agents are owned by the specified user" / "Failed to get the specified agent"
- "Successfully retrieved all the volumes" / "No Volumes are exclusively assigned to the specified user" / "Failed to get all volumes"
- "Successfully retrieved all the diskSafes" / "No Disksafes are associated with the agents owned by the user" / "Failed to get all diskSafes"
- "Successfully retrieved all the policies" / "No Policies are associated with the disksafe assigned to the agents owned by the user" / "Failed to get all the policies"
- "Failed to update all policie(s)" / "All policie(s) update successfully"
- "Failed to update all User(s)" / "All User(s) updated successfully"
The following steps can be accomplished by using this script:
- Find a User with the specified ID. If a User with the ID does not exist, then exit or save the User ID.
- Find Sub-Users for the specified Power User. If there are any, save their User IDs.
- Find Agents which have the specified Users as their owner. Save the Agent IDs.
- Find Disk Safes associated with the specified Agent. Save the Disk Safe IDs.
- Find Policies associated with the found Disk Safes. Save the Policy IDs.
- Disable found Policies.
- Disable found Users.
Below, you can find steps to take in the program user interface in order to perform the same actions as the script. We also provide you with screen-shots illustrating the scripts for every step.
Log in to the CDP Server user interface using your username and password.
To find a User by username, follow the instructions below.
1. Click on "Users" in the Main Menu to access the Users page.
2. Click on "Basic List Filter" located in the Users sub-menu.
3. Enter a username, select the "Power-User" check-box, and click "Filter."
While the script searches by User ID, we search by username in the CDP interface.
4. The found Users are displayed in the list.
5. Click on the User in the list, and then select the "Sub-Users" tab in the "Details" pane located in the bottom area of the interface.
Once the "Sub-Users" tab is selected, all Sub-Users will be listed there.
Select the "Agents" tab in the "Details" pane in the bottom area of the interface to list all associated Agents.
In the bottom "Details" pane, select the "Volumes" tab to list the Volumes assigned to the selected User.
1. Click on the "Detail" icon in front of the Volume to drill down to the Disk Safes.
2. In the displayed window, select the "Disk Safes" tab to list the Disk Safes assigned to the selected Volume.
In the "Users" list, find the appropriate User and click on the "Disable" icon in the "Actions" column for this User.
2. To confirm the deletion of the associated Policies and Sub-Users, select the following check-boxes:
- Disable Policies
- Disable Sub-Users
3. Click "OK" in the confirmation dialog window.
4. After clicking on "OK," you will be returned to the Users List.