This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/master by this push:
     new 2cf25baab [#8496] skip limit when adding a trove category if the 
current user is a site admin
2cf25baab is described below

commit 2cf25baabaa8e2641b591e678cf5b910502b64b3
Author: Guillermo Cruz <[email protected]>
AuthorDate: Fri Feb 3 15:04:52 2023 -0600

    [#8496] skip limit when adding a trove category if the current user is a 
site admin
---
 Allura/allura/ext/admin/admin_main.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Allura/allura/ext/admin/admin_main.py 
b/Allura/allura/ext/admin/admin_main.py
index 5fb371fda..f02acc200 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -54,6 +54,7 @@ from . import widgets as aw
 import six
 
 
+
 log = logging.getLogger(__name__)
 
 
@@ -432,9 +433,10 @@ class ProjectAdminController(BaseController):
         trove_obj = M.TroveCategory.query.get(trove_cat_id=int(new_trove))
         error_msg = None
         in_trove = False
-        if type in ['license', 'audience', 'developmentstatus', 'language'] 
and len(current_troves) >= 6:
+        if type in ['license', 'audience', 'developmentstatus', 'language'] 
and len(
+                current_troves) >= 6 and not h.is_site_admin(c.user):
             error_msg = 'You may not have more than 6 of this category.'
-        elif type in ['topic'] and len(current_troves) >= 3:
+        elif type in ['topic'] and len(current_troves) >= 3 and not 
h.is_site_admin(c.user):
             error_msg = 'You may not have more than 3 of this category.'
         elif trove_obj is not None:
             in_trove = trove_obj._id in current_troves

Reply via email to