type: object
properties:
  username:
    type: string
    description: Username
  groups:
    type: array
    description: List of groups to which the current user belongs
    items:
      type: string
  two_fa_send_to:
    type: string
    description: >-
      Holds either the email or the pushover token of the user. It's used to
      deliver 2FA token to user when 2FA is enabled
  group_permissions_enabled:
    type: boolean
    description: | 
      Are group permissions enabled. 
      Requires a database for the user authentication and a `group_details` table.
      [read more](https://oss.rport.io/docs/no02-api-auth.html#database)
  effective_user_permissions:
      type: object
      description: The effective user right inhereted from the group permissions
      properties:
        commands:
          type: boolean
          description: Is user allowed to execute commands
        monitoring:
          type: boolean
          description: Is user allowed to read monitoring data
        scheduler:
          type: boolean
          description: Is user allowed to create scheduled tasks
        scripts:
          type: boolean
          description: Is user allowed to execute scipts
        tunnels:
          type: boolean
          description: Is user allowed to create tunnels
        uploads:
          type: boolean
          description: Is user allowed to upload files
        vault:
          type: boolean
          description: Is user allowed to access the vault
        auditlog:
          type: boolean
          description: Is user allowed to access the auditlog