Fixes bug on Dataset listing when user not creator.
This commit is contained in:
parent
b13bbdb670
commit
bb3fb91ba8
|
@ -83,7 +83,7 @@ public class DatasetDaoImpl extends DatabaseAccess<Dataset> implements DatasetDa
|
|||
public QueryableList<Dataset> getAuthenticated(QueryableList<Dataset> query, UserInfo principal) {
|
||||
if (principal.getId() == null) query.where((builder, root) -> builder.equal(root.get("isPublic"), true));
|
||||
else {
|
||||
query.where((builder, root) -> builder.or(builder.equal(root.get("dmp").get("creator"), principal), builder.equal(root.join("dmp").join("users", JoinType.LEFT).get("id"), principal.getId())));
|
||||
query.where((builder, root) -> builder.or(builder.equal(root.get("dmp").get("creator"), principal), builder.equal(root.join("dmp", JoinType.LEFT).join("users", JoinType.LEFT).join("user", JoinType.LEFT).get("id"), principal.getId())));
|
||||
}
|
||||
return query;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue