From 684d5ca47788eed4bdd8fa30a29b9979acb1f4b4 Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Fri, 20 May 2016 18:02:23 +0200
Subject: [ldap/ad] Support home directory remapping options

---
 data/dozmod-upgrade.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'data/dozmod-upgrade.sql')

diff --git a/data/dozmod-upgrade.sql b/data/dozmod-upgrade.sql
index f235926..190436e 100644
--- a/data/dozmod-upgrade.sql
+++ b/data/dozmod-upgrade.sql
@@ -81,7 +81,7 @@ DELETE pm
 -- Migrate image permissions
 INSERT IGNORE INTO sat.imagepermission(imagebaseid, userid, canlink, candownload, canedit, canadmin)
 	SELECT pm.GUID_imageID, pm.userID, pm.link_allowed, pm.image_read, pm.image_write, pm.image_admin
-	FROM bwLehrpool.pm_VLData_image AS pm;
+	FROM bwLehrpool.pm_VLData_image AS pm WHERE pm.userID IN (SELECT userid FROM sat.user);
 
 -- Delete lectures which link to a non existing image
 DELETE lec
-- 
cgit v1.2.3-55-g7522

