support lockout after several unsuccessful login attempts

This commit is contained in:
Luke Pulverenti 2015-02-28 08:43:06 -05:00
parent af26d6f9cb
commit 0b9a2a1232
3 changed files with 31 additions and 7 deletions

View File

@ -6,6 +6,12 @@
currentUser = user;
if (user.Policy.IsDisabled) {
$('.disabledUserBanner', page).show();
} else {
$('.disabledUserBanner', page).hide();
}
if (user.ConnectLinkType == 'Guest') {
$('#fldConnectInfo', page).hide();
$('#txtUserName', page).prop("disabled", "disabled");

View File

@ -122,7 +122,11 @@
imgUrl = 'css/images/userflyoutdefault.png';
}
html += '<div class="cardImage" style="background-image:url(\'' + imgUrl + '\');">';
var imageClass = 'cardImage';
if (user.Policy.IsDisabled) {
imageClass += ' disabledUser';
}
html += '<div class="' + imageClass + '" style="background-image:url(\'' + imgUrl + '\');">';
if (user.ConnectUserId && addConnectIndicator) {
html += '<div class="playedIndicator" title="' + Globalize.translate('TooltipLinkedToMediaBrowserConnect') + '"><div class="ui-icon-cloud ui-btn-icon-notext"></div></div>';

View File

@ -18,8 +18,20 @@
<p class="lnkEditUserPreferencesContainer">
<a class="lnkEditUserPreferences" href="#" target="_blank">${ButtonEditOtherUserPreferences}</a>
</p>
<br/>
<form id="editUserProfileForm">
<div class="disabledUserBanner" style="display:none;">
<div class="btn btnDarkAccent btnStatic">
<div>
${HeaderThisUserIsCurrentlyDisabled}
</div>
<div style="font-weight:normal;font-size:90%;margin-top:5px;">
${MessageReenableUser}
</div>
</div>
</div>
<ul data-role="listview" class="ulForm">
<li id="fldUserName">
<label for="txtUserName">${LabelName}</label>
@ -66,13 +78,15 @@
<div class="fieldDescription">${OptionAllowRemoteSharedDevicesHelp}</div>
<br />
</div>
<div id="fldIsEnabled" style="margin: 1em 0 2em;">
<div data-role="controlgroup">
<input type="checkbox" id="chkDisabled" name="chkDisabled" />
<label for="chkDisabled">${OptionDisableUser}</label>
</div>
<div class="fieldDescription">${OptionDisableUserHelp}</div>
</div>
<div id="accessControlDiv" data-role="collapsible">
<h2>${HeaderAdvancedControl}</h2>
<div id="fldIsEnabled" style="margin: 1em 0 2em;">
<input type="checkbox" id="chkDisabled" name="chkDisabled" data-mini="true" />
<label for="chkDisabled">${OptionDisableUser}</label>
<div class="fieldDescription">${OptionDisableUserHelp}</div>
</div>
<div style="margin: 1em 0;">
<input type="checkbox" id="chkDisableUserPreferences" data-mini="true" />
<label for="chkDisableUserPreferences">${OptionDisableUserPreferences}</label>