##// END OF EJS Templates
auth: don't break hashing in case of user with empty password....
auth: don't break hashing in case of user with empty password. In some cases such as LDAP user created via external scripts users might set the passwords to empty. The hashing uses the md5(password_hash) to store reference to detect password changes and forbid using the same password. In case of pure LDAP users this is not valid, and we shouldn't raise Errors in such case. This change makes it work for empty passwords now.

File last commit:

r2105:4ad1a937 default
r2203:8a18c3c3 default
Show More
settings_sessions.mako
62 lines | 2.3 KiB | application/x-mako | MakoHtmlLexer
sessions: added interface to show, and cleanup user auth sessions.
r1295 <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('User Sessions Configuration')}</h3>
</div>
<div class="panel-body">
<%
elems = [
(_('Session type'), c.session_model.SESSION_TYPE, ''),
(_('Session expiration period'), '{} seconds'.format(c.session_conf.get('beaker.session.timeout', 0)), ''),
(_('Total sessions'), c.session_count, ''),
(_('Expired sessions ({} days)').format(c.cleanup_older_days ), c.session_expired_count, ''),
]
%>
<dl class="dl-horizontal settings">
%for dt, dd, tt in elems:
<dt>${dt}:</dt>
dan
tooltip: use consistent h.tooltip usage to set tooltips.
r1843 <dd title="${h.tooltip(tt)}">${dd}</dd>
sessions: added interface to show, and cleanup user auth sessions.
r1295 %endfor
</dl>
</div>
</div>
<div class="panel panel-warning">
<div class="panel-heading">
<h3 class="panel-title">${_('Cleanup Old Sessions')}</h3>
</div>
<div class="panel-body">
forms: unified usage of h.secure_form. Make sure we ALWAYS pass in...
r2105 ${h.secure_form(h.route_path('admin_settings_sessions_cleanup'), request=request)}
sessions: added interface to show, and cleanup user auth sessions.
r1295
user-sessions: fix other backend expired count, and fixed some helper text.
r1298 <p>
${_('Cleanup user sessions that were not active during chosen time frame.')} <br/>
${_('After performing this action users whose session will be removed will be required to log in again.')} <br/>
<strong>${_('Picking `All` will log-out you, and all users in the system.')}</strong>
</p>
<script type="text/javascript">
$(document).ready(function() {
$('#expire_days').select2({
containerCssClass: 'drop-menu',
dropdownCssClass: 'drop-menu-dropdown',
dropdownAutoWidth: true,
minimumResultsForSearch: -1
});
});
</script>
sessions: added interface to show, and cleanup user auth sessions.
r1295 <select id="expire_days" name="expire_days">
% for n in [60, 90, 30, 7, 0]:
<option value="${n}">${'{} days'.format(n) if n != 0 else 'All'}</option>
% endfor
</select>
<button class="btn btn-small" type="submit"
onclick="return confirm('${_('Confirm to cleanup user sessions')}');">
${_('Cleanup sessions')}
</button>
${h.end_form()}
</div>
</div>