Hi,
I would like to show a message in the panel, in case the user has no rights to edit the page. Therefore, I want to check if the current logged in user is contained in my author field (multiple possible).
query: >
not page.author.toUser.id.find(kirby.user.id)
I’m struggling to find a working solution.
my article.yml
fields:
editPermissionInfo:
type: info
theme: warning
label: ""
text: |
**Read only**
You, logged in as »{{ kirby.user.username }}« ({{ kirby.user.role }}), do not have editing rights for this page.
query: >
not page.author.toUser.id.find(kirby.user.id)
[...]
- width: 1/3
sections:
meta:
type: fields
fields:
author:
label: "Authors who can edit this article"
type: users
multiple: true
translate: false
Thank You,
Christian