incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [12/16] git commit: [#5502] ticket:505 Get rid of limited_tools login
Date Wed, 18 Dec 2013 21:05:56 GMT
[#5502] ticket:505 Get rid of limited_tools login

Since we already have to create an instance of App, in order to verify
if tool is installable, limit_tools logic isn't necessary anymore.


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

Branch: refs/heads/master
Commit: dbf375b70180b50a5817337f9f8fbb7e44131b4e
Parents: 6168a24
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Dec 18 14:15:23 2013 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Dec 18 20:38:58 2013 +0000

----------------------------------------------------------------------
 Allura/allura/ext/admin/admin_main.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dbf375b7/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 44e5ecb..98445fc 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -100,17 +100,11 @@ class AdminApp(Application):
 
     @staticmethod
     def installable_tools_for(project):
-        limited_tools = []
-        for tool in project.app_configs:
-            if not project.app_instance(tool).installable:
-                if tool.tool_name not in limited_tools:
-                    limited_tools.append(tool.tool_name)
-
         tools = []
         for name, App in g.entry_points['tool'].iteritems():
             cfg = M.AppConfig(project_id=project._id, tool_name=name)
             app = App(project, cfg)
-            if name not in limited_tools and app.installable:
+            if app.installable:
                 tools.append(dict(name=name, app=App))
             session(cfg).expunge(cfg)  # prevent from saving temporary config to db
         tools.sort(key=lambda t: (t['app'].status_int(), t['app'].ordinal))


Mime
View raw message