incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [13/36] git commit: [#5502] ticket:505 Server-side validation of installation limit
Date Fri, 20 Dec 2013 18:50:39 GMT
[#5502] ticket:505 Server-side validation of installation limit


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/cae7c5e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cae7c5e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cae7c5e8

Branch: refs/heads/db/6388
Commit: cae7c5e8c61a37a44c28051683beb15a93ec99b8
Parents: 17fc3f1
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Dec 18 13:43:39 2013 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Dec 18 20:38:58 2013 +0000

----------------------------------------------------------------------
 Allura/allura/ext/admin/admin_main.py | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cae7c5e8/Allura/allura/ext/admin/admin_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index 918e1cd..535993f 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -630,6 +630,10 @@ class ProjectAdminController(BaseController):
                     sp.ordinal = int(new['ordinal'])
                 else:
                     require_access(c.project, 'admin')
+                    installable_tools = AdminApp.installable_tools_for(c.project)
+                    if not ep_name.lower() in [t['name'].lower() for t in installable_tools]:
+                        flash('Intallation limit exceeded.', 'error')
+                        return
                     mount_point = new['mount_point'] or ep_name
                     M.AuditLog.log('install tool %s', mount_point)
                     h.log_action(log, 'install tool').info(


Mime
View raw message