diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2013-01-28 00:13:01 +0100 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2013-01-28 00:13:01 +0100 |
commit | ce2cfb00174b09953bc1048e3317debf589aac57 (patch) | |
tree | a433f49ea0a62ce4b0332f6fccb851c8ae4ed717 /rhodecode/templates/index_base.html | |
parent | 39c8a5340588e0df78c74d0b43741512fbf39dea (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.html | 4 |
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 |