I want to save the user who creates a node in some form in the content repository.
My class looks something like this:
'A.B:Document.D' superTypes: 'Neos.Neos:Document': true properties: creator: type: string defaultValue: 'here should the user be saved'
However I can’t find any way to access the user in the ContentRepository. I tried playing around with ClientEval:node. …’, but couldn’t find the appropriate property or it only showed as simple string when I called the property with Neos.Fusion:Debug in my Fusion-file.
I also tried writing an Eel Helper accessing the UserService, but this only seems to work with Fusion and not in the Content Repository.
Another way I thought about, but couldn’t implement was using the contextpath/workspaceName and abbreviating it.
Is there any way this is possible, so that I can save the creator of a node?
The final goal of this approach is, that users can only edit nodes they created themselves, so if there is a shortcut to that or best practices to achieve that, that would also be great.