<%namespace name="base" file="/base/base.html"/>

${_('Repository Group Permissions')}

${h.secure_form(url('edit_repo_group_perms', group_name=c.repo_group.group_name),method='put')} ## USERS %for _user in c.repo_group.permissions(): %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None): %else: ##forbid revoking permission from yourself, except if you're an super admin %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin: %else: ## special case for current user permissions, we make sure he cannot take his own permissions %endif %endif %endfor ## USER GROUPS %for _user_group in c.repo_group.permission_user_groups(): %endfor
${_('None')} ${_('Read')} ${_('Write')} ${_('Admin')} ${_('User/User Group')}
${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")} ${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")} ${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")} ${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")} ${base.gravatar(_user.email, 16)} ${h.link_to_user(_user.username)} %if getattr(_user, 'admin_row', None): (${_('super admin')}) %endif %if getattr(_user, 'owner_row', None): (${_('owner')}) %endif
${h.radio('u_perm_%s' % _user.user_id,'group.none')} ${h.radio('u_perm_%s' % _user.user_id,'group.read')} ${h.radio('u_perm_%s' % _user.user_id,'group.write')} ${h.radio('u_perm_%s' % _user.user_id,'group.admin')} ${base.gravatar(_user.email, 16)} % if _user.username == h.DEFAULT_USER: ${h.DEFAULT_USER} - ${_('permission for all other users')} % else: ${h.link_to_user(_user.username)} % endif %if _user.username != h.DEFAULT_USER: ${_('Revoke')} %endif ${h.radio('u_perm_%s' % _user.user_id,'group.none', disabled="disabled")} ${h.radio('u_perm_%s' % _user.user_id,'group.read', disabled="disabled")} ${h.radio('u_perm_%s' % _user.user_id,'group.write', disabled="disabled")} ${h.radio('u_perm_%s' % _user.user_id,'group.admin', disabled="disabled")} ${base.gravatar(_user.email, 16)} % if _user.username == h.DEFAULT_USER: ${h.DEFAULT_USER} - ${_('permission for all other users')} % else: ${h.link_to_user(_user.username)} % endif (${_('delegated admin')})
${h.radio('g_perm_%s' % _user_group.users_group_id,'group.none')} ${h.radio('g_perm_%s' % _user_group.users_group_id,'group.read')} ${h.radio('g_perm_%s' % _user_group.users_group_id,'group.write')} ${h.radio('g_perm_%s' % _user_group.users_group_id,'group.admin')} %if h.HasPermissionAny('hg.admin')(): ${_user_group.users_group_name} %else: ${_user_group.users_group_name} %endif ${_('Revoke')}
${_('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 permissions to selected types of children of this group, including non-private repositories and other groups if chosen.')}
${h.submit('save',_('Save'),class_="btn btn-primary")} ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
${h.end_form()}