Rights contexts#

Overview#

The rights context defines the rights the client has on the transformation of Data Instances values (the Data Entities). The right on the transformation request on a single data entity can be:

  • Not defined: no access to the data. The response to the transformation request is a null value.
  • Can READ: data can be read. The response to the transformation request is the input value.
  • Can TRANSFORM: data can be transformed. The response to the transformation request is the transformed input value.

A given rights context is represented (instantiated) with an array of evidences sets

IMPORTANT: the rights contexts and the evidences sets defining the rights contexts must be defined in RPS CoreConfiguration

JSON instantiation#

Rights contexts are instantiated using JSON to be used in the Transform API requests.

{
  "rightsContexts": [
    {
      "guid": "[string]",
      "evidences": [
        {
          "name": "[string]",
          "value": "[string]"
        },
        "..."
      ]
    },
    "..."
  ]
}
JSON attributeTypeDescriptionRequired
[i] .guid
string
a random generated valid GUID defining the rights context i
[i] .evidences
array
the evidences set for the rights context i. It is an array of one or more evidence objects {name,value}
[i] .evidences[j] .name
string
the name of the evidence j for the rights context i
[i] .evidences[j] .value
string
the value of the evidence j for the rights context i

Example of JSON instantiation#

{
  "rightsContexts": [
    {
      "guid": "ff271899-b4ee-4aeb-9eb1-7f77c4acd28",
      "evidences": [
        {
          "name": "User role",
          "value": "Administrator"
        }
      ]
    },
    {
      "guid": "38d891de-7bd5-42ef-8150-d0d44ce9316f",
      "evidences": [
        {
          "name": "User role",
          "value": "Guest"
        },
        {
          "name": "Country",
          "value": "Switzerland"
        }
      ]
    }
  ]
}

Access#

You must belong to the Configuration user group to create and modify rights contexts