name: OAuth2AccessTokens
icon: entity
label: OAuth2 Token
enable_search: false
hidden: true
fields:
  userId:
    label: User
    type: lookup
    reference_to: users
    sortable: true
    filterable: true
  expires:
    type: datetime
    label: Expiration Time
  clientId:
    type: text
    label: Client ID
    omit: true
    defaultValue: creator
  accessToken:
    type: text
    label: Token
    defaultValue: !<tag:yaml.org,2002:js/function> |-
      function () {
              return Random.id(38);
            }
list_views:
  all:
    label: All OAuth2 Access Tokens
    columns:
      - userId
      - expires
      - accessToken
permission_set:
  user:
    allowCreate: false
    allowDelete: false
    allowEdit: false
    allowRead: false
    modifyAllRecords: false
    viewAllRecords: false
  admin:
    allowCreate: true
    allowDelete: true
    allowEdit: true
    allowRead: true
    modifyAllRecords: true
    viewAllRecords: true
