Restricting The EnterpriseOne Evironment On The JAS Server
The organization has a requirement to have a user only login to a certain environment from a certain JAS server instance.
With a basic install of EnterpriseOne, this would be very easy. However, the 2 environments that are required to be separated are build on top of the same pathcode. Within the JAS settings there is a "Path Codes" parameter that allows you to specify which Path Code will be allowed to be accessed from that particular HTML Server instance.
As you can see from the image, there is also a setting for the "Default Environment". However, there is not a setting to specify which environments are allowed to be accessed.
So, I did a little JSP hacking and came up with a way to restrict the EnterpriseOne environments that can be accessed from a particular HTML Server instance on JAS:
The solution involves creating a file that gets "included" into another.
The first file is the one that we created. We called it "_EnvRestriction.htm":
function redirect(url, msg) { var TARG_ID = "redirectSpan"; var e = document.getElementById(TARG_ID); var cTicks = parseInt(e.innerHTML); var timer = setInterval(function() { if( cTicks ) { e.innerHTML = --cTicks; } else { clearInterval(timer); document.body.innerHTML = msg; location = url; } }, 1000); } redirect("http://","") input{display:none;}label{display:none;} YOU DO NOT HAVE ACCESS TO THIS ENVIRONMENT!
You will be redirected to in 10 seconds.Next we edit the file "html4env.jsp" to include our new file (_EnvRestriction.htm). At about line 172, we include the following right before the <tr> tag:
Please Note: this may not be the best way to restrict environments but it is what we are using. Also, this solution has been successfully used for EnterpriseOne Tools Release 8.97.2.0 & 8.97.2.6. If you are using a Tools Release other than those listed you may need to make adjustments for this solution to work or it may not work at all.
Is there another way to restrict the environment that a user is able to login to when accessing a JAS server if there are multiple environments built on top of the same path code?
Average Rating