Monday, November 06, 2006

Fun with Javascript

Are your users complaining that they do not see their requests or have the right permissions when they log in with their network username and password to your midtier? Could be that while the username was recognized and authenticated by AREA LDAP, it doesn't match the value on the Submitter field for their requests. Why? Because people often use mixed-case lettering when typing their login names (i.e. "JSmith" vs. "jsmith"), but Remedy only recognizes an exact, case-sensitive, match between the current user and the Submitter field. Even on case-insensitive databases like Microsoft SQL!

You're not likely to convince people to type in all lowercase if they are not accustomed to it, and to make matters worse, AREA LDAP is happy to authenticate them no matter how they log in. If you are using the self-help module of ITSM, you may soon have a single user with Help Desk Cases entered under three different usernames.

The solution is to force an lowercase entry on the login page.

The solution is really very simple - simply add this to HTML code where the text box for the Login is defined. You will want to add this where you see the "input type = text NAME =username" code. For reasons beyond my imagining, the Blogger technology that runs my blog will not allow me to enter HTML code without having it converted.

You are going to add this code to the tag. What it says is - convert anything entered into this field into lowercase.

onChange="javascript:this.value=this.value.toLowerCase();"

Just keep in mind that anytime you change one of the JSP files, like login.jsp, you will have to make those changes again every time you install a patch or upgrade.

No comments: