-
-
Notifications
You must be signed in to change notification settings - Fork 126
Closed
Labels
Description
Description and expected behavior
Hello!
When making an access policy like this:
@@allow('update,read', this.locations?[countryCode in auth().authDirs.articleCountryCodes])where locations is part of the base delegate model, it adds an unnecessary rule at the end without delegate_aux_entity:
id: true,
contents: {
where: {
AND: [
{
lng: "en"
},
{
OR: [
{
AND: [
{
OR: [
{
article: {
AND: [
{
NOT: {
delegate_aux_entity: {
...
}
}
},
{
OR: [
{
....
},
{
delegate_aux_entity: {
org: {
members: {
some: {
userId: {
equals: "TFbhuKSoCajZTh1ELdpPF71YJX8nYgf4"
}
}
}
}
}
},
{
locations: {
some: {
countryCode: {
in: [
"vn"
]
}
}
}
Environment
- ZenStack version: 2.13.3
- Prisma version: 6.4.1
- Database type: Postgresql