diff --git a/planetstack/openstack_observer/steps/sync_user_deployments.py b/planetstack/openstack_observer/steps/sync_user_deployments.py
index 5d6ce2d..42aae56 100644
--- a/planetstack/openstack_observer/steps/sync_user_deployments.py
+++ b/planetstack/openstack_observer/steps/sync_user_deployments.py
@@ -20,42 +20,7 @@
 
         if (deleted):
             return UserDeployments.deleted_objects.all()
-
-        # user deployments are not visible to users. We must ensure
-        # user are deployed at all deploymets available to their sites.
         else:
-            deployments = Deployment.objects.all()
-            site_deployments = SiteDeployments.objects.all()
-            site_deploy_lookup = defaultdict(list)
-            for site_deployment in site_deployments:
-                site_deploy_lookup[site_deployment.site].append(site_deployment.deployment)
-
-            user_deploy_lookup = defaultdict(list)
-            for user_deployment in UserDeployments.objects.all():
-                user_deploy_lookup[user_deployment.user].append(user_deployment.deployment)
-           
-            all_deployments = Deployment.objects.filter() 
-            for user in User.objects.all():
-                if user.is_admin:
-                    # admins should have an account at all deployments
-                    expected_deployments = deployments
-                else:
-                    # normal users should have an account at their site's deployments
-                    #expected_deployments = site_deploy_lookup[user.site]
-                    # users are added to all deployments for now
-                    expected_deployments = deployments        
-                for expected_deployment in expected_deployments:
-                    if not user in user_deploy_lookup or \
-                      expected_deployment not in user_deploy_lookup[user]: 
-                        # add new record
-                        ud = UserDeployments(user=user, deployment=expected_deployment)
-                        ud.save()
-                        #user_deployments.append(ud)
-                    #else:
-                    #    # update existing record
-                    #    ud = UserDeployments.objects.get(user=user, deployment=expected_deployment)
-                    #    user_deployments.append(ud)
-
             return UserDeployments.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None)) 
 
     def sync_record(self, user_deployment):
