${h.form(url('edit_repo_group_perms', group_name=c.repo_group.group_name),method='put')}
## USERS %for r2p in c.repo_group.repo_group_to_perm: ##forbid revoking permission from yourself, except if you're an super admin %if c.rhodecode_user.user_id != r2p.user.user_id or c.rhodecode_user.is_admin: %else: %endif %endfor ## USER GROUPS %for g2p in c.repo_group.users_group_to_perm: %endfor <% _tmpl = h.literal("""' \ \ \ \ \ \ '""") %> ## ADD HERE DYNAMICALLY NEW INPUTS FROM THE '_tmpl'
${_('none')} ${_('read')} ${_('write')} ${_('admin')} ${_('user/user group')}
${h.radio('u_perm_%s' % r2p.user.username,'group.none')} ${h.radio('u_perm_%s' % r2p.user.username,'group.read')} ${h.radio('u_perm_%s' % r2p.user.username,'group.write')} ${h.radio('u_perm_%s' % r2p.user.username,'group.admin')} %if h.HasPermissionAny('hg.admin')() and r2p.user.username != 'default': ${r2p.user.username} %else: ${r2p.user.username if r2p.user.username != 'default' else _('default')} %endif %if r2p.user.username !='default': ${_('revoke')} %endif ${h.radio('u_perm_%s' % r2p.user.username,'group.none', disabled="disabled")} ${h.radio('u_perm_%s' % r2p.user.username,'group.read', disabled="disabled")} ${h.radio('u_perm_%s' % r2p.user.username,'group.write', disabled="disabled")} ${h.radio('u_perm_%s' % r2p.user.username,'group.admin', disabled="disabled")} ${r2p.user.username if r2p.user.username != 'default' else _('default')} ${_('delegated admin')}
${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.none')} ${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.read')} ${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.write')} ${h.radio('g_perm_%s' % g2p.users_group.users_group_name,'group.admin')} %if h.HasPermissionAny('hg.admin')(): ${g2p.users_group.users_group_name} %else: ${g2p.users_group.users_group_name} %endif ${_('revoke')}
\
\ \ \
\
\
${_('Add new')}
${_('apply to children')}: ${h.radio('recursive', 'none', label=_('None'), checked="checked")} ${h.radio('recursive', 'groups', label=_('Repository Groups'))} ${h.radio('recursive', 'repos', label=_('Repositories'))} ${h.radio('recursive', 'all', label=_('Both'))} ${_('Set or revoke permission to all children of that group, including non-private repositories and other groups if selected.')}
${h.submit('save',_('Save'),class_="btn")} ${h.reset('reset',_('Reset'),class_="btn")}
${h.end_form()}