diff --git a/rhodecode/templates/base/perms_summary.mako b/rhodecode/templates/base/perms_summary.mako
--- a/rhodecode/templates/base/perms_summary.mako
+++ b/rhodecode/templates/base/perms_summary.mako
@@ -11,11 +11,14 @@
'user_groups': 'User Group Permissions',
'repositories_groups': 'Repository Group Permissions',
} %>
+
%for section in sorted(permissions.keys(), key=lambda item: {'global': 0, 'repository_branches': 1}.get(item, 1000)):
+ <% total_counter = 0 %>
+
-
${section_to_label.get(section, section)} - ${len(permissions[section])}
+ ${section_to_label.get(section, section)} -
ΒΆ
% if side_link:
@@ -189,6 +192,15 @@
return sorted(permissions, key=custom_sorter)
%>
%for k, section_perms in name_sorter(permissions[section].items()):
+ ## for display purposes, for non super-admins we need to check if shown
+ ## repository is actually accessible for user
+ <% repo_perm = permissions['repositories'][k] %>
+ % if repo_perm == 'repository.none' and not c.rhodecode_user.is_admin:
+ ## skip this entry
+ <% continue %>
+ % endif
+
+ <% total_counter +=1 %>
% for pattern, perm in branch_sorter(section_perms.items()):
@@ -300,7 +312,9 @@
|
%endif
+ <% total_counter +=1 %>
%endif
+
%endfor
@@ -315,6 +329,11 @@
+
+
+
%endfor