Adding user roles with Export and Import in OM Web Viewer 12.1
search cancel

Adding user roles with Export and Import in OM Web Viewer 12.1

book

Article ID: 29122

calendar_today

Updated On:

Products

Output Management Web Viewer

Issue/Introduction

It is possible to use the Export and Import features of Web Viewer to add roles to an existing set of users. This is done by exporting the user objects to an xml file, modifying the xml data and importing the xml file.

Environment

Output Management Web Viewer 12.1

Resolution

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:
  1. Click the Administration tab
  2. Click the Export Link
  3. When the Admin Object Export – Webpage Dialog appears, select Users then click the Next button
  4. 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
  5. 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>johndoe</userID>
<firstName>John</firstName>
<lastName>Doe</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>johndoe</userID>
<firstName>John</firstName>
<lastName>Doe</lastName>
<ownerRoleName>System Admin</ownerRoleName>
<memberOf>
<roleName>New Role</roleName>
</memberOf>
</user>
 
add an existing <roleName> element 
<user>
<userID>johndoe</userID>
<firstName>John</firstName>
<lastName>Doe</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 johndoe. “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:
 
  1. Click the Administration tab
  2. Click the Import Link
  3. When the Admin Object Import dialog appears, select Users , select Override in the Conflict Option column then click the Browse button
  4. Specify the location and name for the modified XML file then click Open
  5. Click the Import button
  6. When the import is complete, click the Close button