diff rhodecode/templates/index_base.html @ 3333:069884383cc7 beta

Implemented #738 Giving a user WRITE+ permissions on folder should not allow repo creation in root folder. user can create repos only if he got explicitly permission for creating repos globally, or have WRITE+ permission on a group. Then he can create repositories inside this group
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 05 Feb 2013 03:04:46 +0100
parents 2e618376cef8
children 667630c98eaa
line wrap: on
line diff
--- a/rhodecode/templates/index_base.html	Tue Feb 05 01:57:37 2013 +0100
+++ b/rhodecode/templates/index_base.html	Tue Feb 05 03:04:46 2013 +0100
@@ -7,12 +7,10 @@
             </h5>
             %if c.rhodecode_user.username != 'default':
               <ul class="links">
-                %if h.HasPermissionAny('hg.admin','hg.create.repository')():
+                %if h.HasPermissionAny('hg.admin','hg.create.repository')() or h.HasReposGroupPermissionAny('group.write', 'group.admin')(c.group.group_name if c.group else None):
                   <li>
                   %if c.group:
-                    %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