ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins. Read more for important details.
ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins.Read more for important details.

Redirecting iChain Users based on Groups

Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class
0 0 2,906
0 Likes
A Forum reader recently asked:

"I need help on how to redirect our iChain users, based on their groups, to webpage.html. If the users belong to group1, they go to group1.html, group2 goes to
group2.html, group3 to group3.html, etc. It's all in the same domain but different folders."

And here is the response from Andrey Karyagin ...

Solution



This is possible, if each user is a member of one and only one group. In other words, it is possible if groupMembership attribute contains only one value.

Some time ago, one of my engineers implemented the following configuration to redirect user to desired page, depending on the siteLocation attribute. This configuration consists of index.html, which should be created in the Apache root directory, and iChain Form Fill Policy which should be configured via ConsoleOne. As you can see below, when the sitelocation attribute is empty, the user will be redirected to www.somecompany.ru/nps. But when sitelocation is not empty, the user will be redirected to some other page, such as www.somecompany.ru/merchant

In this case, the sitelocation attribute is filled with merchant. Just replace sitelocation with groupMembership, and you should get the desired result. This configuration works fine with IE6 SP1, FireFox 2.0.0.12, and Netscape 7,8, and 9.

Here's an index.html sample:


<html>
<head>
<meta http-equiv="cache-control" content="no-cache">
<script language="javascript">

function go()
{
var url = document.UrlForm.url.value;
if ( url.length == 0 ) url = "/nps";

self.location.replace ( url );
}

</script>
</head>

<body onLoad="go();">

<form name="UrlForm" method="post" action="dummy">
<input type=hidden name="url">
</form>

</body>
</html>



And here is a Form Fill Policy sample:


<urlPolicy>
<name>HomeUrlFill</name>
<url>www.somecompany.ru/</url>
<formCriteria>
<form name="UrlForm" method="post" action="dummy">
</formCriteria>
<actions>
<fill>
<input name="url" value="~sitelocation">
</fill>
</actions>
</urlPolicy>

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.