Follow-up on linkkey feature in combination with access rules

Hi everybody,

half a year ago, I asked this question ( Can I apply the Linkkey feature for logged in users as well? ).

I now have a 50 % solution:

I have a table “Table” for which I have defined the following access rules:

  1. user.LinkKey.UUID == rec.UUID → R
  2. user.Access in [OWNER] and user.LinkKey.UUID==“” → RUCD
  3. Everyone else → [None]

This works because now everyone who has a linkkey with this UUID only sees this one row.

What does not work is that the owner sees the whole list if no linkkey property is set for UUID, i.e., the link is simply to the whole page:

  • linkToGrist/p/72 → OWNER does not see anything (but the OWNER should see everything according to Rule 2)
  • linkToGrist/p/72?UUID_=XXXX-XXXX–XXXX (UUID) → OWNER sees only this row

To solve this, I would just have to know what user.linkkey is equal to if it is not provided in the link. I have tried

  • user.LinkKey.UUID==“”
  • user.LinkKey.UUID is None
  • user.LinkKey.UUID == [ ]
  • user.LinkKey==””
  • user.Linkkey is None
  • user.Linkkey == [ ]

Does anyone know?

I think I found the solution by continuously trying new formulations of the second rule. It now says
user.Access in [OWNER] and not user.LinkKey.UUID

Thanks for posting what worked for you @Christian_Hoffmann . For architectural and efficiency reasons, access rules are interpreted by javascript rather than by python, and there could be a glitch here around undefined versus null types? Just speculating.