##// END OF EJS Templates
goto-switcher: optimized performance and query capabilities....
goto-switcher: optimized performance and query capabilities. - Previous implementation had on significant bug. The use of LIMIT 20 was limiting results BEFORE auth checks. In case of large ammount of similarly named repositories user didn't had access too, the result goto search was empty. This was becuase first 20 items fetched didn't pass permission checks and final auth list was empty. To fix this we now use proper filtering for auth using SQL. It means we first check user allowed repositories, and add this as a filter so end result from database is already to only the accessible repositories.

File last commit:

r1943:089c11e9 default
r2038:2bdf9d4d default
Show More
permissions.mako
59 lines | 1.8 KiB | application/x-mako | MakoHtmlLexer
## -*- coding: utf-8 -*-
<%inherit file="/base/base.mako"/>
<%def name="title()">
${_('Permissions Administration')}
%if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
</%def>
<%def name="breadcrumbs_links()">
${h.link_to(_('Admin'),h.route_path('admin_home'))}
&raquo;
${_('Permissions')}
</%def>
<%def name="menu_bar_nav()">
${self.menu_items(active='admin')}
</%def>
<%def name="main()">
<div class="box">
<div class="title">
${self.breadcrumbs()}
</div>
<div class="sidebar-col-wrapper scw-small">
##main
<div class="sidebar">
<ul class="nav nav-pills nav-stacked">
<li class="${'active' if c.active=='application' else ''}">
<a href="${h.route_path('admin_permissions_application')}">${_('Application')}</a>
</li>
<li class="${'active' if c.active=='global' else ''}">
<a href="${h.route_path('admin_permissions_global')}">${_('Global')}</a>
</li>
<li class="${'active' if c.active=='objects' else ''}">
<a href="${h.route_path('admin_permissions_object')}">${_('Object')}</a>
</li>
<li class="${'active' if c.active=='ips' else ''}">
<a href="${h.route_path('admin_permissions_ips')}">${_('IP Whitelist')}</a>
</li>
<li class="${'active' if c.active=='auth_token_access' else ''}">
<a href="${h.route_path('admin_permissions_auth_token_access')}">${_('AuthToken Access')}</a>
</li>
<li class="${'active' if c.active=='perms' else ''}">
<a href="${h.route_path('admin_permissions_overview')}">${_('Overview')}</a>
</li>
</ul>
</div>
<div class="main-content-full-width">
<%include file="/admin/permissions/permissions_${c.active}.mako"/>
</div>
</div>
</div>
</%def>