diff --git a/rhodecode/templates/base/perms_summary.html b/rhodecode/templates/base/perms_summary.html new file mode 100644 --- /dev/null +++ b/rhodecode/templates/base/perms_summary.html @@ -0,0 +1,63 @@ +## snippet for displaying permissions overview for users + +<%def name="perms_summary(permissions)"> +
+ %for section in sorted(permissions.keys()): +
${section.replace("_"," ").capitalize()}
+ %if not permissions[section]: + ${_('No permissions defined yet')} + %else: +
+ + + + + + + + + %if section == 'global': + %for k in sorted(permissions[section], key=lambda s: s.lower()): + + + + + + %endfor + %else: + %for k, section_perm in sorted(permissions[section].items(), key=lambda s: s[1]+s[0].lower()): + + + + + + %endfor + %endif + + +
${_('Name')}${_('Permission')}${_('Edit Permission')}
+ ${h.get_permission_name(k)} + + ${h.boolicon(k.split('.')[-1] != 'none')} + + ${_('edit')} +
+ %if section == 'repositories': + ${k} + %elif section == 'repositories_groups': + ${k} + %endif + + ${section_perm} + + %if section == 'repositories': + ${_('edit')} + %elif section == 'repositories_groups': + ${_('edit')} + %endif +
+
+ %endif + %endfor +
+