So I’ve got the following situation:
'Users': collection ['Name'] {
'Name': text
'Type': stategroup (
'Admin' { }
'Unknown' { }
)
}
'Questions': collection ['Question id']
can-create: user
can-delete: user .'Type'?'Admin' || user is ( >'User asked' )
{
can-update: user .'Type'?'Admin' || user is ( >'User asked' )
'Question id': text
'User asked': text -> ^ . 'Users'[] = ? // Get a reference to the current user
'Title': text
'Question text': text
//...
{
How can I get a reference to the current user so that when a question is created the ‘User asked’ field will point to the user that created it and the ‘can-delete’ and ‘can-update’ permissions could take place?