From 5e297f3b677dcb7dd8b58e46169ba834601aaac3 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 5 Mar 2013 16:07:35 -0500 Subject: [PATCH] Strip dead test code (that actually threw an exception when enabled due to undefined variables). --- lib/galaxy/security/__init__.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/galaxy/security/__init__.py b/lib/galaxy/security/__init__.py index a0dd25ca0e6..4567786237e 100644 --- a/lib/galaxy/security/__init__.py +++ b/lib/galaxy/security/__init__.py @@ -903,26 +903,10 @@ class GalaxyRBACAgent( RBACAgent ): .filter( and_( trans.app.model.DatasetPermissions.dataset_id.in_( dataset_ids ), trans.app.model.DatasetPermissions.action == self.permitted_actions.DATASET_ACCESS.action ) ) \ .all() - # Every dataset returned has "access" privileges associated with it, # so it's not public. for permission in access_data_perms: datasets_public[ permission.dataset_id ] = False - - # Test code: Check if the results match up with the original: - test_code = False - if test_code: - log.debug( "datasets_are_public test: check datasets_are_public matches dataset_is_public:" ) - test_success = True - for dataset in datasets: - orig_is_public = self.dataset_is_public( dataset ) - if orig_is_public == datasets_public[ dataset.id ]: - log.debug( "\tMatch for dataset %d" % dataset.id ) - else: - success = False - log.error( "\tERROR: Did not match: single is_public: %s; multiple is_public: %s" - % ( single_is_public, datasets_public[ dataset.id ] ) ) - log.debug( "datasets_are_public: test succeeded? %s" % test_success ) return datasets_public