aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/templates/index_base.html
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2013-01-28 00:13:01 +0100
committerMarcin Kuzminski <marcin@python-works.com>2013-01-28 00:13:01 +0100
commitce2cfb00174b09953bc1048e3317debf589aac57 (patch)
treea433f49ea0a62ce4b0332f6fccb851c8ae4ed717 /rhodecode/templates/index_base.html
parent39c8a5340588e0df78c74d0b43741512fbf39dea (diff)
hide add repository button when you don't have at least write permission in group
ref #730 --HG-- branch : beta extra : amend_source : 6d582f7419284813cc5b28585bd003d816afb661
Diffstat (limited to 'rhodecode/templates/index_base.html')
-rw-r--r--rhodecode/templates/index_base.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/rhodecode/templates/index_base.html b/rhodecode/templates/index_base.html
index 7bdccaf6..5bb79fd8 100644
--- a/rhodecode/templates/index_base.html
+++ b/rhodecode/templates/index_base.html
@@ -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