Fix issue with Grant authentication

This commit is contained in:
George Kalampokis 2022-03-02 17:51:41 +02:00
parent 75fc8a1d13
commit 56499223cf
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ public class GrantDaoImpl extends DatabaseAccess<Grant> implements GrantDao {
}
public QueryableList<Grant> getAuthenticated(QueryableList<Grant> query, UserInfo principal) {
query.where((builder, root) -> builder.or(builder.equal(root.get("creationUser"), principal), builder.equal(root.join("dmps", JoinType.LEFT).join("users", JoinType.LEFT).join("user", JoinType.LEFT).get("id"), principal.getId()))).distinct();
query.where((builder, root) -> builder.equal(root.get("creationUser").get("id"), principal.getId())).distinct();
return query;
}