Collection 'option' for field with vocabulary.Principals

For my 'notification add-on' ( [SOLVED] Not overloading users with email - #2 by yurj )

I would like to add a 'collection criteria' so it can display 'notificatons for current user (etc):

Since the field is defined like this (see also screenshot):

message_users = schema.Set(
    title=_("label_notify_users", default="Notify users"),
    value_type=schema.Choice(vocabulary="plone.app.vocabularies.Principals"),
)

I wonder: What are my option to make this into 'querystring', for example

 <element>plone.app.querystring.operation.string.currentUser</element>

Should I make a new indexer and index 'both users and groups as users' (but that would still keep users who have been removed from a group (and drop those who have been added).

Alternatively: Could I 'make a new operation' ?

Skjermbilde 2024-11-12 kl. 15.46.24

you can check plone.app.querystring for an example how its done for the Creator criteria: plone.app.querystring/plone/app/querystring/profiles/default/registry.xml at master · plone/plone.app.querystring · GitHub

(Not on computer now)

Can Creator be a group?
My current problem is that I can search for items with 'me' in the field/index' and/or mygroups in the index, but how can I use that in a querystring ( so it should also return items where the field is set to 'Administrator' and/or 'Reviwers')