Before making mass modifications to the database that contains OM Web Viewer administration objects such as roles, users, repositories, etc., take a database backup.
While logged in as an OM Web Viewer system admin, perform the following to export User objects from the Web Viewer database to an XML file:
- Click the Administration tab
- Click the Export Link
- When the Admin Object Export – Webpage Dialog appears, select Users then click the Next button
- When prompted, select a location and name for the file then click Save (the exact steps will vary depending on the browser being used). The default filename is adminUser.xml
- Click the Close button
Next, use an XML editor of your choice to modify adminUser.xml (or whatever you named the file during the export process). The file contains a series of <user> elements which comprise definitions for all users defined in your OM Web Viewer database, for example:
<user>
<userID>#######</userID>
<firstName>####</firstName>
<lastName>####</lastName>
<ownerRoleName>System Admin</ownerRoleName>
<memberOf>
<roleName>Default User</roleName>
</memberOf>
</user>
The <memberOf> element contains one or more <roleName> elements which represent the roles defined for the user. To add an existing role to an existing user or set of users, you can either modify an existing <roleName> element or add an additional one. For example:
modify an existing <roleName> element
<user>
<userID>########</userID>
<firstName>####</firstName>
<lastName>####</lastName>
<ownerRoleName>System Admin</ownerRoleName>
<memberOf>
<roleName>New Role</roleName>
</memberOf>
</user>
add an existing <roleName> element
<user>
<userID>#######</userID>
<firstName>####</firstName>
<lastName>####</lastName>
<ownerRoleName>System Admin</ownerRoleName>
<memberOf>
<roleName>Default User</roleName>
<roleName>New Role</roleName>
</memberOf>
</user>
In either case, when the Import feature is used specifying the Override option and the modified XML file as input, “New Role” will be added to user ########. “Default User” will remain; this role has to be deleted manually using the Admin panel if it’s not desired.
To perform the import, log in as a system admin and do the following:
- Click the Administration tab
- Click the Import Link
- When the Admin Object Import dialog appears, select Users , select Override in the Conflict Option column then click the Browse button
- Specify the location and name for the modified XML file then click Open
- Click the Import button
- When the import is complete, click the Close button