jmix-framework / jmix

Jmix framework
https://www.jmix.io
Apache License 2.0
561 stars 118 forks source link

Apply row-level constraints to JPQL band queries #548

Closed alexbudarov closed 4 months ago

alexbudarov commented 3 years ago

forum topic: https://forum.cuba-platform.com/t/are-accessgroup-constraints-used-in-reports-addon/13195

If we can write a Groovy band with the same query with DataManager, and row-level constraints are applied.

Then why we can't apply constraints to queries in JPQL bands in a report?

Are there any technical implementation problems?

alexbudarov commented 3 years ago

Example of query generated by Report Wizard:

select
e.question as "question",
e.answer as "answer",
e.lang as "lang"
from playground_Card e where e.deck.id = ${deck1}

(loads only fields)

gorbunkov commented 3 years ago

It seems that we cannot implement the "values" query that guarantees that row-level security is applied to all entities that participate in the query