functions:
  - isAdmin: root.admins[auth.uid] == true

root:
  .read: auth.uid == 'upkeeper' || isAdmin()
  .write: auth.uid == 'upkeeper'
  responses:
    $responseKey:
      .read: data.userKey == auth.uid
      .write: next.userKey == auth.uid
      .value: $responseKey == next.userKey + '|' + next.setKey + '|' + next.itemKey
      userKey: required indexed string
      setKey: required indexed string
      itemKey: required indexed string
      kind: required string
      content: required any
  items:
    .write: isAdmin()
    .read: auth.uid != null
    $itemKey:
      setKey: required indexed string
      highlightedResponses:
        kind: required string
        content: required string
        userKey: required string
  admins:
    .read/write: false
    $userKey: boolean

functions:
  - isAdmin: root.admins[auth.uid] == true

root:
  .read: auth.uid == 'upkeeper' || isAdmin()
  .write: auth.uid == 'upkeeper'
  responses:
    $responseKey:
      .read: data.userKey == auth.uid
      .write: next.userKey == auth.uid
      .value: $responseKey == next.userKey + '|' + next.setKey + '|' + next.itemKey
      userKey: required indexed string
      setKey: required indexed string
      itemKey: required indexed string
      kind: required string
      content: any
  items:
    .write: isAdmin()
    .read: auth.uid != null
    $itemKey:
      setKey: required indexed string
      highlightedResponses:
        kind: required string
        content: required string
        userKey: required string
  admins:
    .read/write: false
    $userKey: boolean

Allow saving an empty response as an answer
Allow saving an empty response as an answer
