Schema for Hospital Permissions

From Permissions.schema.yaml (hospital/Permissions.schema)

---
$id: https://skeleton.botmd.io/hospital/Permissions.schema
$schema: http://json-schema.org/draft-07/schema#

title: Permissions
description: Hospital application specific permissions. This is also known as `ACL` in Jarvis.

type: object
required: []
additionalProperties: true # to allow union with other sub-schemas

properties:
  stream_response:
    title: Stream Response
    description: Allow the content to be streamed directly from Hippocrates instead of a redirect. Use sparingly and with care. Defaults to `false`.
    type: boolean

  hospitals:
    $ref: "#/definitions/Hospitals"

  tags:
    $ref: "#/definitions/Tags"

  acl_dnf:
    $ref: "#/definitions/DNFs"

  restricted_organizations:
    title: Restricted Organizations
    description: For legacy use.

    type: array
    minItems: 1

    items:
      type: string
      minLength: 1

#end properties

definitions:
  Hospitals:
    title: Hospitals
    description: Array of `Hospital` keys that will have access to the resource. Defaults to allow any hospital if not specified. Empty array (i.e., `[]`) will deny all access.

    type: array
    uniqueItems: true
    minItems: 1

    items:
      - $ref: "/hospital/ProfileTags.schema#/definitions/Organization Keys"
  #end hospitals

  Tags:
    title: Tags
    description: Array of profile `tag`s that will have access to the resource. Defaults to allow any tag if not specified. Empty array (i.e., `[]`) will deny all access.

    type: array
    uniqueItems: true
    minItems: 1

    items:
      anyOf:
        - $ref: "/hospital/ProfileTags.schema#/definitions/Accessible Tags"
        - $ref: "/hospital/ProfileTags.schema#/definitions/Bot MD Tags"
        - $ref: "/hospital/ProfileTags.schema#/definitions/Organization Keys"
        - $ref: "/hospital/ProfileTags.schema#/definitions/Department Tags"
      #end anyOf
  #end tags

  DNFs:
    title: ACL DNF
    description: Array of ACLs in DNF format (OR of ANDs). Defaults to allow any acl_dnf if not specified. Empty array (i.e., `[]`) will deny all access.

    type: array
    uniqueItems: true
    minItems: 1

    items:
      type: string
      minLength: 1
      #end anyOf
  #end dnfs
#end properties

[Main Page] [Schema Documentation] [Examples]