Fixes bug on Project listing not authenticating properly. (Issue #90)
This commit is contained in:
parent
7b4a809f3d
commit
399c2630af
|
@ -74,8 +74,7 @@ public class ProjectDaoImpl extends DatabaseAccess<Project> implements ProjectDa
|
|||
}
|
||||
|
||||
public QueryableList<Project> getAuthenticated(QueryableList<Project> query, UserInfo principal) {
|
||||
//query.where((builder, root) -> builder.or(builder.equal(root.get("creationUser"), principal), builder.isMember(principal, root.join("dmps", JoinType.LEFT).get("users")))).distinct();
|
||||
query.where((builder, root) -> builder.or(builder.equal(root.get("creationUser"), principal), builder.equal(root.join("dmps").join("users", JoinType.LEFT).get("id"), principal.getId()))).distinct();
|
||||
query.where((builder, root) -> builder.or(builder.equal(root.get("creationUser"), principal), builder.equal(root.join("dmps").join("users", JoinType.LEFT).join("User", JoinType.LEFT).get("id"), principal.getId()))).distinct();
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue