diff options
author | Stephan Schwär | 2021-04-20 13:15:41 +0200 |
---|---|---|
committer | Stephan Schwär | 2021-04-20 13:15:41 +0200 |
commit | e4b3cc7d669df4334695fa1f8c4bbfd40932710b (patch) | |
tree | cd5f94f2c0e8c3c8fb58211dc639073220b32cea | |
parent | [server] Run formatter for DbImage.java (diff) | |
download | tutor-module-e4b3cc7d669df4334695fa1f8c4bbfd40932710b.tar.gz tutor-module-e4b3cc7d669df4334695fa1f8c4bbfd40932710b.tar.xz tutor-module-e4b3cc7d669df4334695fa1f8c4bbfd40932710b.zip |
[server] Replace bogus info where possible
Issue: #3846
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java index d1798331..d5ebd37c 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java @@ -90,7 +90,7 @@ public class DbImage { MysqlStatement stmt = null; // Students should only be able to request a download of an image. Therefore not all information is needed for this task. if (user.role == Role.STUDENT) { - stmt = connection.prepareStatement("SELECT i.imagebaseid, i.latestversionid" + stmt = connection.prepareStatement("SELECT i.imagebaseid, i.latestversionid, i.virtid" + " FROM imagebase i" + " LEFT JOIN imagepermission perm ON (i.imagebaseid = perm.imagebaseid AND perm.userid = :userid)" + " WHERE i.imagebaseid = :imagebaseid"); @@ -118,8 +118,8 @@ public class DbImage { // todo evaluate if this is needed and if there is a nicer way to create ImageDetailsRead object ImagePermissions defaultPermissions = new ImagePermissions(false, true, false, false); image = new ImageDetailsRead(rs.getString("imagebaseid"), rs.getString("latestversionid"), - versions, imageBaseId, imageBaseId, tags, 0, imageBaseId, 0, 0, imageBaseId, - imageBaseId, null, false, defaultPermissions); + versions, "DownloadedImage", null, tags, 0, rs.getString("virtid"), 0, 0, null, null, + null, false, defaultPermissions); image.setUserPermissions(defaultPermissions); } else { ImagePermissions defaultPermissions = DbImagePermissions.fromResultSetDefault(rs); |