Mercurial > kallithea
diff rhodecode/templates/index_base.html @ 3241:12f2547cf267 beta
hide add repository button when you don't have at least write permission in group
ref #730
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 28 Jan 2013 00:13:01 +0100 |
parents | 8b8edfc25856 |
children | 2e618376cef8 |
line wrap: on
line diff
--- a/rhodecode/templates/index_base.html Mon Jan 28 00:06:30 2013 +0100 +++ b/rhodecode/templates/index_base.html Mon Jan 28 00:13:01 2013 +0100 @@ -10,7 +10,9 @@ %if h.HasPermissionAny('hg.admin','hg.create.repository')(): <li> %if c.group: - <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span> + %if h.HasReposGroupPermissionAny('group.write', 'group.admin')(c.group.group_name): + <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span> + %endif %else: <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository'))}</span> %endif