Hide the “Private computer” checkbox in OWA 2013
We have the requirement at work to disallow the option of using the “Private computer” checkbox in Outlook Web Access 2013. In this guide I’ll show you how to disable and hide the option of allowing users to use a private session.
Normally OWA 2013 allows the user to use a private session so that it prevents OWA from automatically logging the user out after a specified period of time. As a business you may not want to allow this but rather force the user to use a non-private session each time. Here is what the OWA login screen normally looks like:
And here is what it will look like when were finished:
The first thing you’ll want to do is navigate to the OWA directory on your Exchange server. To make this easy, open up IIS Manager and expand the Default Web Site, revealing the owa
virtual application. Click on owa
followed by Explore
in the Actions pane:
When Windows Explorer opens, open up the auth
directory. In there you should see a file named logon.aspx
. Before proceeding, make a backup of this file in a safe place. Next, right click this file and choose Edit:
Next, do a search for (ShowPublicPrivateSelection)
. You should see some code that looks similar to the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<% if (ShowPublicPrivateSelection) { %> <div class="signInCheckBoxText"> <input id="chkPrvt" onclick="clkSec()" name="trusted" value="4" type="checkbox" class="chk" checked role="checkbox" aria-labelledby="privateLabel"/> <span id="privateLabel" aria-hidden="true"><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.ThisIsAPrivateComputer)%></span> <%=(IsRtl ? "‏" : "‎") + LocalizedStrings.GetHtmlEncoded(Strings.IDs.OpenParentheses)%> <a href="#" class="signInCheckBoxLink" id="lnkShwSec" onclick="clkSecExp('lnkShwSec')" onkeydown="kdSecExp('lnkShwSec')" role="link"><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.ShowExplanation)%></a> <a href="#" class="signInCheckBoxLink" id="lnkHdSec" onclick="clkSecExp('lnkHdSec')"onkeydown="kdSecExp('lnkHdSec')" style="display:none" role="link"> <%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.HideExplanation)%> </a> <%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.CloseParentheses) + (IsRtl ? "‏" : "‎")%> </div> <div id="prvtExp" class="signInExpl" style="display:none" role="note"><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.PrivateExplanation)%></div> <div id="prvtWrn" class="signInWarning" style="display:none" role="note"><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.PrivateWarning)%></div> <% } %> |
Our first area of interest is the checkbox code, we need to remove the checked
attribute from it. Here’s what it looks like before:
1 |
<input id="chkPrvt" onclick="clkSec()" name="trusted" value="4" type="checkbox" class="chk" checked role="checkbox" aria-labelledby="privateLabel"/> |
And here it is with the “checked” attribute removed:
1 |
<input id="chkPrvt" onclick="clkSec()" name="trusted" value="4" type="checkbox" class="chk" role="checkbox" aria-labelledby="privateLabel"/> |
Next we’ll add a surrounding DIV that has its style attribute display
set to none
so the checkbox/explanations are never visible. You’ll end up with code that now looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<% if (ShowPublicPrivateSelection) { %> <div style="display: none"> <div class="signInCheckBoxText"> <input id="chkPrvt" onclick="clkSec()" name="trusted" value="4" type="checkbox" class="chk" role="checkbox" aria-labelledby="privateLabel"/> <span id="privateLabel" aria-hidden="true"><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.ThisIsAPrivateComputer)%></span> <%=(IsRtl ? "‏" : "‎") + LocalizedStrings.GetHtmlEncoded(Strings.IDs.OpenParentheses)%> <a href="#" class="signInCheckBoxLink" id="lnkShwSec" onclick="clkSecExp('lnkShwSec')" onkeydown="kdSecExp('lnkShwSec')" role="link"><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.ShowExplanation)%></a> <a href="#" class="signInCheckBoxLink" id="lnkHdSec" onclick="clkSecExp('lnkHdSec')"onkeydown="kdSecExp('lnkHdSec')" style="display:none" role="link"> <%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.HideExplanation)%> </a> <%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.CloseParentheses) + (IsRtl ? "‏" : "‎")%> </div> <div id="prvtExp" class="signInExpl" style="display:none" role="note"><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.PrivateExplanation)%></div> <div id="prvtWrn" class="signInWarning" style="display:none" role="note"><%=LocalizedStrings.GetHtmlEncoded(Strings.IDs.PrivateWarning)%></div> </div> <% } %> |
Notice the highlighted lines. Lastly, save your changes to the file and viola, no more Private computer
checkbox!
Recent Comments