Advanced ACL with reference field and custom properties

Hi,

I’m failing at doing something that should be quite simple.

I have three tables:

  • cities, with a list of cities
  • projects, with a list of projects, with a ReferenceField to the cities table
  • users, with a list of users, and a ReferenceField to the cities table

What I want to achieve:

  • allow users to see only the projects on their city, easy: user.custom.City == rec.City and voilà :slight_smile:
  • allow users to see only their city in the cities tables => fail, I’ve tested this user.custom.City == rec, but the users cannot see the table at all

Here is a test case: https://nuage.yohanboniface.me/test_acl_with_reference.grist

Thanks in advance for your help :slight_smile:

Yohan

Hi @Yohan_Boniface, thanks for the test case. I tweaked it to use user.custom.City == rec.id and I think that does what you want.

ACL formulas are currently evaluated in a simplified environment where references are just numeric ids.

Ah, damn, thanks! I think I already knew that but forgot it!