diff --git a/rhodecode/templates/base/perms_summary.html b/rhodecode/templates/base/perms_summary.html --- a/rhodecode/templates/base/perms_summary.html +++ b/rhodecode/templates/base/perms_summary.html @@ -1,6 +1,9 @@ ## snippet for displaying permissions overview for users +## usage: +## <%namespace name="p" file="/base/perms_summary.html"/> +## ${p.perms_summary(c.perm_user.permissions)} -<%def name="perms_summary(permissions)"> +<%def name="perms_summary(permissions, show_all=False)">
%for section in sorted(permissions.keys()):
${section.replace("_"," ").capitalize()}
@@ -9,35 +12,44 @@ %else:
- - - - - - - + ## global permission box %if section == 'global': - %for k in sorted(permissions[section], key=lambda s: s.lower()): + - + + + + %for k in permissions[section]: + + - %endfor + %else: + + + + + + + %for k, section_perm in sorted(permissions[section].items(), key=lambda s: s[1]+s[0].lower()): + %if section_perm.split('.')[-1] != 'none' or show_all: + %endif %endfor + %endif - -
${_('Name')}${_('Permission')}${_('Edit Permission')}
+ ${_('Permission')}${_('Edit Permission')}
${h.get_permission_name(k)} - ${h.boolicon(k.split('.')[-1] != 'none')} - ${_('edit')}
${_('Name')}${_('Permission')}${_('Edit Permission')}
%if section == 'repositories': ${k} %elif section == 'repositories_groups': ${k} + %elif section == 'user_groups': + ##${k} + ${k} %endif @@ -48,13 +60,15 @@ ${_('edit')} %elif section == 'repositories_groups': ${_('edit')} + %elif section == 'user_groups': + ##${_('edit')} %endif
%endif