##// END OF EJS Templates
caches: use individual namespaces per user to prevent beaker caching problems....
caches: use individual namespaces per user to prevent beaker caching problems. - especially for mysql in case large number of data in caches there could be critical errors storing cache, and thus preventing users from authentication. This is caused by the fact that we used single namespace for ALL users. It means it grew as number of users grew reaching mysql single column limit. This changes the behaviour and now we use namespace per-user it means that each user-id will have it's own cache namespace fragmenting maximum column data to a single user cache. Which we should never reach.

File last commit:

r2105:4ad1a937 default
r2591:36829a17 stable
Show More
user_edit_ips.mako
78 lines | 3.0 KiB | application/x-mako | MakoHtmlLexer
templating: use .mako as extensions for template files.
r1282 <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('Custom IP Whitelist')}</h3>
</div>
<div class="panel-body">
<div class="ips_wrap">
user: show your current IP in ip whitelist page
r1670 <h5>${_('Current IP address')}: <code>${c.rhodecode_user.ip_addr}</code></h5>
templating: use .mako as extensions for template files.
r1282 <table class="rctable ip-whitelist">
<tr>
user: show your current IP in ip whitelist page
r1670 <th>${_('IP Address')}</th>
<th>${_('IP Range')}</th>
<th>${_('Description')}</th>
templating: use .mako as extensions for template files.
r1282 <th></th>
</tr>
%if c.default_user_ip_map and c.inherit_default_ips:
%for ip in c.default_user_ip_map:
<tr>
<td class="td-ip"><div class="ip">${ip.ip_addr}</div></td>
<td class="td-iprange"><div class="ip">${h.ip_range(ip.ip_addr)}</div></td>
global-permissions: ported controller to pyramid view....
r1941 <td class="td-description">${h.literal(_('Inherited from %s') % h.link_to('*default*',h.route_path('admin_permissions_ips')))}</td>
templating: use .mako as extensions for template files.
r1282 <td></td>
</tr>
%endfor
%endif
%if c.user_ip_map:
%for ip in c.user_ip_map:
<tr>
<td class="td-ip"><div class="ip">${ip.ip_addr}</div></td>
<td class="td-iprange"><div class="ip">${h.ip_range(ip.ip_addr)}</div></td>
<td class="td-description"><div class="ip">${ip.description}</div></td>
<td class="td-action">
forms: unified usage of h.secure_form. Make sure we ALWAYS pass in...
r2105 ${h.secure_form(h.route_path('edit_user_ips_delete', user_id=c.user.user_id), request=request)}
users-admin: moved views into pyramid for editing emails and ips....
r1821 ${h.hidden('del_ip_id', ip.ip_id)}
${h.submit('remove_', _('Delete'),id="remove_ip_%s" % ip.ip_id,
templating: use .mako as extensions for template files.
r1282 class_="btn btn-link btn-danger", onclick="return confirm('"+_('Confirm to delete this ip: %s') % ip.ip_addr+"');")}
${h.end_form()}
</td>
</tr>
%endfor
%endif
%if not c.default_user_ip_map and not c.user_ip_map:
<tr>
<td><h2 class="ip">${_('All IP addresses are allowed')}</h2></td>
<td></td>
<td></td>
<td></td>
</tr>
%endif
</table>
</div>
<div>
forms: unified usage of h.secure_form. Make sure we ALWAYS pass in...
r2105 ${h.secure_form(h.route_path('edit_user_ips_add', user_id=c.user.user_id), request=request)}
templating: use .mako as extensions for template files.
r1282 <div class="form">
<!-- fields -->
<div class="fields">
<div class="field">
<div class="label">
<label for="new_ip">${_('New IP Address')}:</label>
</div>
<div class="input">
${h.text('new_ip')} ${h.text('description', placeholder=_('Description...'))}
<span class="help-block">${_('Enter comma separated list of ip addresses like 127.0.0.1,\n'
'or use a ip address with a mask 127.0.0.1/24, to create a network range.\n'
'To specify multiple address range use 127.0.0.1-127.0.0.10 syntax')}</span>
</div>
</div>
<div class="buttons">
${h.submit('save',_('Add'),class_="btn btn-small")}
${h.reset('reset',_('Reset'),class_="btn btn-small")}
</div>
</div>
</div>
${h.end_form()}
</div>
</div>
</div>