Skip to content

Configuration options

Permissions

Bases: Enum

Options of permissions for resources and values:

  • PROJECT_SPECIFIC_PERMISSIONS: the permissions defined on project level will be applied
  • OPEN: the resource/value is visible for everyone
  • RESTRICTED: the resource/value is only visible for project members
  • RESTRICTED_VIEW: the resource/value is visible for everyone, but images are blurred/watermarked for non-project members
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/config_options.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
class Permissions(Enum):
    """
    Options of permissions for resources and values:

    - `PROJECT_SPECIFIC_PERMISSIONS`: the permissions defined on project level will be applied
    - `OPEN`: the resource/value is visible for everyone
    - `RESTRICTED`: the resource/value is only visible for project members
    - `RESTRICTED_VIEW`: the resource/value is visible for everyone,
      but images are blurred/watermarked for non-project members
    """

    PROJECT_SPECIFIC_PERMISSIONS = ""
    OPEN = "open"
    RESTRICTED = "restricted"
    RESTRICTED_VIEW = "restricted-view"

NewlineReplacement

Bases: Enum

Options how to deal with \n inside rich text values.

  • NONE: don't modify the rich text (\n will be lost, because it is meaningless in an XML file)
  • PARAGRAPH: replace Start\nEnd with <p>Start</p><p>End</p>
  • LINEBREAK: replace Start\nEnd with Start<br/>End
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/config_options.py
22
23
24
25
26
27
28
29
30
31
32
33
class NewlineReplacement(Enum):
    """
    Options how to deal with `\\n` inside rich text values.

    - `NONE`: don't modify the rich text (`\\n` will be lost, because it is meaningless in an XML file)
    - `PARAGRAPH`: replace `Start\\nEnd` with `<p>Start</p><p>End</p>`
    - `LINEBREAK`: replace `Start\\nEnd` with `Start<br/>End`
    """

    NONE = auto()
    PARAGRAPH = auto()
    LINEBREAK = auto()