Home > ECM, Tech tips > Fast switching users in Content Server demo site

Fast switching users in Content Server demo site

November 24th, 2014 Leave a comment Go to comments

In Content Server, some settings are applied at a user level by the administrator. For instance, the access controls on the content, or the ability to create more or less type of objects in the system.
In order to quickly test or demonstrate this, it is convenient to switch from one user (with administrative rights) to other users showing the applied settings.
Here is one convenient way to do this using a custom view on the front page (Enterprise Workspace):

Screen Shot 2014-11-24 at 10.59.15 AM

fast switching users in Content Server

First, you need to enable “Allow log-in via HTTP GET request” under “Server Configuration > Configure Security Parameters > Log-in Connection Policies” in the admin pages. This may not work in a production environment for security purpose, but is acceptable in a demo or development environment:

HTTP GET request

HTTP GET request

Also, your environment must be using the Content Server Internal Authentication (or use a backdoor to access internal accounts on your server) for this switching to work.

Next, you may want to retrieve some users icons to use on the top row of the custom view (optional). I chose icons with a similar look and feel, and with a 64×64 size. You will save these icons in a location that is mapped in your Content Server Site:

By default, the “http://servername/img/” is mapped to the “..OPENTEXT/support” folder, so you could use this to save your icons in a subfolder within the “support” folder. Check the proper mapping (if different than “img”), and, save the icons in a folder named: “..OPENTEXT/support/appearances/users/”

You will also need to create and know the users needed for switching, together with their passwords (which will be visible to everyone, thus, making this method unsafe for a production environment)

Then you need to create a text file which will be used to build a custom view with the following code, using the “LL.login” function to pass the user name and password, and bypass the login screen of Content Server:

fast_switching
 
<style>
.center
{
text-align: center;
}
</style>
<table width="100%">
<tr>
<td class="center"><a href="http://<servername>/OTCS/cs.exe?func=LL.login&username=Admin&password=<admin_password>&NextURL=%2FOTCS%2Fcs.exe%3Ffunc%3Dllworkspace"><img src="http://<servername>/img/appearances/users/user1.png" alt="Admin" height="64" width="64"></a></td>
<td class="center"><a href="http://<servername>/OTCS/cs.exe?func=LL.login&username=<user_name>01&password=<user_password>&NextURL=%2FOTCS%2Fcs.exe%3Ffunc%3Dllworkspace"><img src="http://<servername>/img/appearances/users/user2.png" alt="John Doe" height="64" width="64"></a></td>
</tr>
<tr>
<td class="center"><a href="http://<servername>/OTCS/cs.exe?func=LL.login&username=Admin&password=<admin_password>&NextURL=%2FOTCS%2Fcs.exe%3Ffunc%3Dllworkspace">Admin</a></td>
<td class="center"><a href="http://<servername>/OTCS/cs.exe?func=LL.login&username=<user_name>&password=<user_password>&NextURL=%2FOTCS%2Fcs.exe%3Ffunc%3Dllworkspace">John Doe</a></td>
</tr>
</table>

The first row (<tr>) is for the icons, and the second row displays the text.

Replace the values between “<>” such as server name, passwords and user names with actual values, and also check for the image (icons) mapping, as well as the instance name (OTCS in this case, seen both in the beginning of the URL and in the NextURL tag).

Add as many <td> (cells) in each row of the table as you need users to switch.

Create a Customview in the Enterprise Workspace using this text file and test it. Ensure the custom view has proper permissions to allow all users to see and use it. When your user switching works, you can then hide this custom view from the Enterprise workspace.

Categories: ECM, Tech tips Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

"