From a8557bb139121e0a938bf096c65718897e0e2647 Mon Sep 17 00:00:00 2001
From: James Allen <james@sharelatex.com>
Date: Fri, 24 Mar 2017 13:46:31 +0000
Subject: [PATCH] Don't find holding accounts with a hashed password

---
 migrations/5_remove_holding_accounts.coffee | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migrations/5_remove_holding_accounts.coffee b/migrations/5_remove_holding_accounts.coffee
index 3e45d41..4946698 100644
--- a/migrations/5_remove_holding_accounts.coffee
+++ b/migrations/5_remove_holding_accounts.coffee
@@ -8,7 +8,7 @@ module.exports = HoldingAccountMigration =
 	DRY_RUN: true
 
 	findHoldingAccounts: (callback = (error, users) ->) ->
-		db.users.find({holdingAccount: true}, {holdingAccount: 1, email: 1}, callback)
+		db.users.find({holdingAccount: true, hashedPassword: { $exists: false }}, {holdingAccount: 1, email: 1}, callback)
 
 	deleteUserProjects: (user_id, callback = (error) ->) ->
 		# Holding accounts can't own projects, so only remove from 
-- 
GitLab